From d0d675f51ac958bb757c4c22d8a5dd3df833fa96 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Mon, 29 Nov 1993 16:38:31 +0000 Subject: [PATCH] Fixed ANSI-C glitch with '%' operator --- sym.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.40.0