]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
Initial platform / compiler specific code refactoring.
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index 5882bdbfc2e76f2100e12006194e001f55da90c1..2d36afbc8f639d83cb52202f16f9dd9320701841 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1473,14 +1473,10 @@ int lex_do(lex_file *lex)
         lex_endtoken(lex);
 
         lex->tok.ttype = TOKEN_CHARCONST;
-         /* It's a vector if we can successfully scan 3 floats */
-#ifdef _MSC_VER
-        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 ",
+
+        /* It's a vector if we can successfully scan 3 floats */
+        if (platform_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;