]> granicus.if.org Git - flex/commitdiff
Fixed ANSI-C glitch with '%' operator
authorVern Paxson <vern@ee.lbl.gov>
Mon, 29 Nov 1993 16:38:31 +0000 (16:38 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Mon, 29 Nov 1993 16:38:31 +0000 (16:38 +0000)
sym.c

diff --git a/sym.c b/sym.c
index 3583aab3d79a476e07d50db88fa39a9aa797cb2c..8e4788c8c239c00acc19aa057d7b869f84794c34 100644 (file)
--- a/sym.c
+++ b/sym.c
@@ -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;
        }