projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82d4b95
)
glsl2: Fix lexing of octal values, including "0".
author
Eric Anholt
<eric@anholt.net>
Mon, 19 Jul 2010 18:52:54 +0000
(11:52 -0700)
committer
Eric Anholt
<eric@anholt.net>
Mon, 19 Jul 2010 18:58:03 +0000
(11:58 -0700)
When faced with a constructor like 'ivec4(0, 2, 0, 0)', we would
manage to get a value of 2 instead of 0 for the first "0". Usually 2
characters past "0" would point at some junk and lex as 0 anyway.
Fixes glsl-octal and glsl-unused-varyings.
src/glsl/glsl_lexer.lpp
patch
|
blob
|
history
diff --git
a/src/glsl/glsl_lexer.lpp
b/src/glsl/glsl_lexer.lpp
index 6c1000876e11823866427f654e06cbff3f9ea761..b0afc44d5e9351e17137d3be29dafc0f46fd5169 100644
(file)
--- a/
src/glsl/glsl_lexer.lpp
+++ b/
src/glsl/glsl_lexer.lpp
@@
-231,7
+231,7
@@
void return VOID;
return INTCONSTANT;
}
0[0-7]* {
- yylval->n = strtol(yytext
+ 2
, NULL, 8);
+ yylval->n = strtol(yytext, NULL, 8);
return INTCONSTANT;
}