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
This commit is contained in:
John Kessenich 2015-05-07 01:04:29 +00:00
parent b7cc33116a
commit 11f5fc04b8
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@
#include <vector>
#include <iostream>
#include <cassert>
#include <assert.h>
namespace spv {

View File

@ -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);