mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(glslang) use strtok_r instead of strtok
This commit is contained in:
parent
6319fa30c3
commit
5a2a6db589
@ -69,6 +69,7 @@ struct SlangProcessHolder
|
||||
|
||||
SlangProcess::SlangProcess()
|
||||
{
|
||||
char *save = NULL;
|
||||
char DefaultConfig[] =
|
||||
"MaxLights 32\n"
|
||||
"MaxClipPlanes 6\n"
|
||||
@ -165,11 +166,11 @@ SlangProcess::SlangProcess()
|
||||
"generalConstantMatrixVectorIndexing 1\n";
|
||||
|
||||
const char *delims = " \t\n\r";
|
||||
char *token = strtok(DefaultConfig, delims);
|
||||
char *token = strtok_r(DefaultConfig, delims, &save);
|
||||
|
||||
while (token)
|
||||
{
|
||||
const char *value_str = strtok(0, delims);
|
||||
const char *value_str = strtok_r(0, delims, &save);
|
||||
int value = (int)strtoul(value_str, nullptr, 0);
|
||||
|
||||
if (string_starts_with_size(token, "Max", STRLEN_CONST("Max")))
|
||||
@ -384,7 +385,7 @@ SlangProcess::SlangProcess()
|
||||
else if (string_is_equal(token, "doWhileLoops"))
|
||||
Resources.limits.doWhileLoops = (value != 0);
|
||||
|
||||
token = strtok(0, delims);
|
||||
token = strtok_r(0, delims, &save);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user