GLSL: Only parse [-]1.#INF in HLSL mode.
authorAaron Muir Hamilton <aaron@correspondwith.me>
Mon, 23 Oct 2017 02:56:27 +0000 (02:56 +0000)
committerAaron Muir Hamilton <aaron@correspondwith.me>
Mon, 23 Oct 2017 02:56:27 +0000 (02:56 +0000)
glslang/MachineIndependent/preprocessor/PpScanner.cpp

index fa01549..1099f38 100644 (file)
@@ -128,7 +128,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
         ch = getChar();
 
         // 1.#INF or -1.#INF
-        if (ch == '#') {
+        if (parseContext.intermediate.getSource() == EShSourceHlsl && ch == '#') {
             if ((len <  2) ||
                 (len == 2 && ppToken->name[0] != '1') ||
                 (len == 3 && ppToken->name[1] != '1' && !(ppToken->name[0] == '-' || ppToken->name[0] == '+')) ||