mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
sscanf -> sscanf_s on windows
This commit is contained in:
parent
c3bcfe84b0
commit
812cb5be64
1 changed files with 7 additions and 1 deletions
8
lexer.c
8
lexer.c
|
@ -666,7 +666,13 @@ int lex_do(lex_file *lex)
|
|||
return (lex->tok->ttype = TOKEN_FATAL);
|
||||
|
||||
/* It's a vector if we can successfully scan 3 floats */
|
||||
if (sscanf(lex->tok->value, " %f %f %f ", &lex->tok->constval.v.x, &lex->tok->constval.v.y, &lex->tok->constval.v.z) == 3)
|
||||
#ifdef WIN32
|
||||
if (sscanf_s(lex->tok->value, " %f %f %f ",
|
||||
&lex->tok->constval.v.x, &lex->tok->constval.v.y, &lex->tok->constval.v.z) == 3)
|
||||
#else
|
||||
if (sscanf(lex->tok->value, " %f %f %f ",
|
||||
&lex->tok->constval.v.x, &lex->tok->constval.v.y, &lex->tok->constval.v.z) == 3)
|
||||
#endif
|
||||
{
|
||||
lex->tok->ttype = TOKEN_VECTORCONST;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue