From: Vern Paxson Date: Mon, 29 Nov 1993 16:38:31 +0000 (+0000) Subject: Fixed ANSI-C glitch with '%' operator X-Git-Tag: flex-2-5-5b~326 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0d675f51ac958bb757c4c22d8a5dd3df833fa96;p=flex Fixed ANSI-C glitch with '%' operator --- diff --git a/sym.c b/sym.c index 3583aab..8e4788c 100644 --- 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; }