diff options
author | vern <vern> | 1993-11-29 16:38:31 +0000 |
---|---|---|
committer | vern <vern> | 1993-11-29 16:38:31 +0000 |
commit | 7874c8e5dd33cf9b040ca5afcec83585e69f5c38 (patch) | |
tree | 627e651174e00cf92de5346b2fe93f3574c83407 /sym.c | |
parent | a4d83480454e3a6f67b8725fe88702d8b64b1dfe (diff) | |
download | flex-7874c8e5dd33cf9b040ca5afcec83585e69f5c38.tar.gz |
Fixed ANSI-C glitch with '%' operator
Diffstat (limited to 'sym.c')
-rw-r--r-- | sym.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -26,7 +26,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -/* $Header: /cvsroot/flex/flex/sym.c,v 2.8 1993/09/16 20:32:03 vern Exp $ */ +/* $Header: /cvsroot/flex/flex/sym.c,v 2.9 1993/11/29 16:38:31 vern Exp $ */ #include "flexdef.h" @@ -163,8 +163,10 @@ int hash_size; locstr = 0; while ( str[locstr] ) - hashval = ((hashval << 1) + (unsigned char) str[locstr++]) % - hash_size; + { + hashval = (hashval << 1) + (unsigned char) str[locstr++]; + hashval %= hash_size; + } return hashval; } |