Skip to content

Commit

Permalink
engine: common: comply with C89 in OpenBSD wai_getExecutablePath
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Ford authored and a1batross committed Nov 25, 2023
1 parent f330aac commit e7e1677
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engine/common/whereami.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,14 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
else
{
const char* PATH = getenv("PATH");
const char* begin;
size_t argv0_length;
if (!PATH)
break;

size_t argv0_length = strlen(argv[0]);
argv0_length = strlen(argv[0]);

const char* begin = PATH;
begin = PATH;
while (1)
{
const char* separator = strchr(begin, ':');
Expand Down

0 comments on commit e7e1677

Please sign in to comment.