summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glcpp/glcpp-parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/glcpp/glcpp-parse.y')
-rw-r--r--src/compiler/glsl/glcpp/glcpp-parse.y9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
index ccb3aa18d36..d83f99f1c7e 100644
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
@@ -462,13 +462,8 @@ control_line_error:
integer_constant:
INTEGER_STRING {
- if (strlen ($1) >= 3 && strncmp ($1, "0x", 2) == 0) {
- $$ = strtoll ($1 + 2, NULL, 16);
- } else if ($1[0] == '0') {
- $$ = strtoll ($1, NULL, 8);
- } else {
- $$ = strtoll ($1, NULL, 10);
- }
+ /* let strtoll detect the base */
+ $$ = strtoll ($1, NULL, 0);
}
| INTEGER {
$$ = $1;