From: Wolfgang (Blub) Bumiller Date: Thu, 16 Aug 2012 11:44:53 +0000 (+0200) Subject: sscanf -> sscanf_s on windows X-Git-Tag: 0.1-rc1~261 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=812cb5be649c863e8d12289d858b15de60e86fd4;p=xonotic%2Fgmqcc.git sscanf -> sscanf_s on windows --- diff --git a/lexer.c b/lexer.c index 0fa25f7..606ef5a 100644 --- a/lexer.c +++ b/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; }