Merge branch 'only-parse-inf-constant-in-hlsl' of https://github.com/xorgy/glslang into xorgy-only-parse-inf-constant-in-hlsl

This commit is contained in:
John Kessenich 2017-10-22 23:19:02 -06:00
commit 016e47f7a3
2 changed files with 4 additions and 36 deletions

View 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] == '+')) ||