mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-24 19:59:40 +00:00
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:
parent
b7cc33116a
commit
11f5fc04b8
@ -54,7 +54,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <assert.h>
|
||||
|
||||
namespace spv {
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user