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 <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <assert.h>
|
||||||
|
|
||||||
namespace spv {
|
namespace spv {
|
||||||
|
|
||||||
|
|||||||
@ -221,7 +221,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
|
|||||||
case CPP_UINTCONSTANT:
|
case CPP_UINTCONSTANT:
|
||||||
strcpy(ppToken->name, tokenText);
|
strcpy(ppToken->name, tokenText);
|
||||||
if (len > 0 && tokenText[0] == '0') {
|
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);
|
ppToken->ival = strtol(ppToken->name, 0, 16);
|
||||||
else
|
else
|
||||||
ppToken->ival = strtol(ppToken->name, 0, 8);
|
ppToken->ival = strtol(ppToken->name, 0, 8);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user