mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-24 05:44:16 +00:00
engine: common: comply with C89 in OpenBSD wai_getExecutablePath
This commit is contained in:
parent
f330aac113
commit
e7e1677786
@ -632,12 +632,14 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char* PATH = getenv("PATH");
|
const char* PATH = getenv("PATH");
|
||||||
|
const char* begin;
|
||||||
|
size_t argv0_length;
|
||||||
if (!PATH)
|
if (!PATH)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
size_t argv0_length = strlen(argv[0]);
|
argv0_length = strlen(argv[0]);
|
||||||
|
|
||||||
const char* begin = PATH;
|
begin = PATH;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
const char* separator = strchr(begin, ':');
|
const char* separator = strchr(begin, ':');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user