Merge branch 'bugfix2' of https://github.com/amdrexu/glslang into amdrexu-bugfix2
This commit is contained in:
commit
4bfb32e17b
6 changed files with 667 additions and 632 deletions
|
|
@ -2,5 +2,5 @@
|
|||
// For the version, it uses the latest git tag followed by the number of commits.
|
||||
// For the date, it uses the current date (when then script is run).
|
||||
|
||||
#define GLSLANG_REVISION "Overload400-PrecQual.1472"
|
||||
#define GLSLANG_DATE "05-Sep-2016"
|
||||
#define GLSLANG_REVISION "Overload400-PrecQual.1474"
|
||||
#define GLSLANG_DATE "09-Sep-2016"
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
|
|||
ppToken->dval = atof(ppToken->name);
|
||||
break;
|
||||
case PpAtomConstInt:
|
||||
case PpAtomConstUint:
|
||||
if (len > 0 && tokenText[0] == '0') {
|
||||
if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
|
||||
ppToken->ival = strtol(ppToken->name, 0, 16);
|
||||
|
|
@ -233,8 +232,16 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
|
|||
} else
|
||||
ppToken->ival = atoi(ppToken->name);
|
||||
break;
|
||||
case PpAtomConstUint:
|
||||
if (len > 0 && tokenText[0] == '0') {
|
||||
if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
|
||||
ppToken->ival = (int)strtoul(ppToken->name, 0, 16);
|
||||
else
|
||||
ppToken->ival = (int)strtoul(ppToken->name, 0, 8);
|
||||
} else
|
||||
ppToken->ival = (int)strtoul(ppToken->name, 0, 10);
|
||||
break;
|
||||
case PpAtomConstInt64:
|
||||
case PpAtomConstUint64:
|
||||
if (len > 0 && tokenText[0] == '0') {
|
||||
if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
|
||||
ppToken->i64val = strtoll(ppToken->name, nullptr, 16);
|
||||
|
|
@ -243,6 +250,15 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
|
|||
} else
|
||||
ppToken->i64val = atoll(ppToken->name);
|
||||
break;
|
||||
case PpAtomConstUint64:
|
||||
if (len > 0 && tokenText[0] == '0') {
|
||||
if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
|
||||
ppToken->i64val = (long long)strtoull(ppToken->name, nullptr, 16);
|
||||
else
|
||||
ppToken->i64val = (long long)strtoull(ppToken->name, nullptr, 8);
|
||||
} else
|
||||
ppToken->i64val = (long long)strtoull(ppToken->name, 0, 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue