aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glcpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-03 09:44:39 +0000
committermarha <marha@users.sourceforge.net>2011-02-03 09:44:39 +0000
commit83a4fe0dc71aafbef11477b284abe530d3877556 (patch)
tree527158f28d9a46d1e9cc83b6c5fa6e8fbed956eb /mesalib/src/glsl/glcpp
parent60107fb2d201703dba061622101dafc139559bca (diff)
downloadvcxsrv-83a4fe0dc71aafbef11477b284abe530d3877556.tar.gz
vcxsrv-83a4fe0dc71aafbef11477b284abe530d3877556.tar.bz2
vcxsrv-83a4fe0dc71aafbef11477b284abe530d3877556.zip
libXext xserver libXau libX11 pixman mesa git update 3 Feb 2011
Diffstat (limited to 'mesalib/src/glsl/glcpp')
-rw-r--r--mesalib/src/glsl/glcpp/glcpp-parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesalib/src/glsl/glcpp/glcpp-parse.y b/mesalib/src/glsl/glcpp/glcpp-parse.y
index aa5a0c4f2..1f6e67fa0 100644
--- a/mesalib/src/glsl/glcpp/glcpp-parse.y
+++ b/mesalib/src/glsl/glcpp/glcpp-parse.y
@@ -388,7 +388,12 @@ expression:
$$ = $1 + $3;
}
| expression '%' expression {
- $$ = $1 % $3;
+ if ($3 == 0) {
+ yyerror (& @1, parser,
+ "zero modulus in preprocessor directive");
+ } else {
+ $$ = $1 % $3;
+ }
}
| expression '/' expression {
if ($3 == 0) {