From 603126624433dbdb6e1b4fcc85f72f75b365cec1 Mon Sep 17 00:00:00 2001 From: Aaron Muir Hamilton Date: Mon, 23 Oct 2017 02:56:27 +0000 Subject: [PATCH] GLSL: Only parse [-]1.#INF in HLSL mode. --- glslang/MachineIndependent/preprocessor/PpScanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/glslang/MachineIndependent/preprocessor/PpScanner.cpp index fa01549df..1099f389c 100644 --- a/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -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] == '+')) ||