aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lemon
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-03-16 22:18:15 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-03-16 22:18:15 +0000
commit4f48d73d9001f8606ca939686c6cdfb42060c3c8 (patch)
tree93dd2b44b2264ef47e3ecc6802b5e5986881d5f9 /tools/lemon
parent3c2c4a390ac76683f800e8696fef65745e23199b (diff)
Copy a bugfix from http://www.sqlite.org/cvstrac/tktview?tn=313
svn path=/trunk/; revision=17651
Diffstat (limited to 'tools/lemon')
-rw-r--r--tools/lemon/lemon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c
index db2e3d5e16..d4aa3b4c36 100644
--- a/tools/lemon/lemon.c
+++ b/tools/lemon/lemon.c
@@ -2896,8 +2896,7 @@ PRIVATE void print_stack_union(
for(j=0; stddt[j]; j++){
hash = hash*53 + stddt[j];
}
- if( hash<0 ) hash = -hash;
- hash = hash%arraysize;
+ hash = (hash & 0x7fffffff)%arraysize;
while( types[hash] ){
if( strcmp(types[hash],stddt)==0 ){
sp->dtnum = hash + 1;