From 11f5fc04b8ea15a077b3698680890f23c4e2cd0a Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Thu, 7 May 2015 01:04:29 +0000 Subject: [PATCH] glslang preprocassor: Fix operator precedence bug. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31087 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- SPIRV/spvIR.h | 2 +- glslang/MachineIndependent/preprocessor/PpTokens.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 91a434fa..c16df104 100644 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -54,7 +54,7 @@ #include #include -#include +#include namespace spv { diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index 56cbbe79..b7cc0d37 100644 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -221,7 +221,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) case CPP_UINTCONSTANT: strcpy(ppToken->name, tokenText); if (len > 0 && tokenText[0] == '0') { - if (len > 1 && tokenText[1] == 'x' || tokenText[1] == 'X') + if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X')) ppToken->ival = strtol(ppToken->name, 0, 16); else ppToken->ival = strtol(ppToken->name, 0, 8);