Thread View: news.software.readers
1 messages
1 total messages
Started by Jeff Bauer
Thu, 16 Dec 1993 17:25
tass 3.2 patch - hash table fix
Author: Jeff Bauer
Date: Thu, 16 Dec 1993 17:25
Date: Thu, 16 Dec 1993 17:25
23 lines
1584 bytes
1584 bytes
We enjoy the look & feel of tass 3.2 enough to where an annoying problem finally had to be fixed. It would core dump now & then on a certain combination of header strings that generated negative indices via the hash function in hashstr.c. Rather than figure out a better function, I just put in a quick sign flip that prevents the crashes. Here it is. Anybody know if there's a newer version of tass anywhere (please email responses) ? *** hashstr.c.ORIG Thu Dec 16 11:57:39 1993 --- hashstr.c Thu Dec 16 11:55:49 1993 *************** *** 51,56 **** --- 51,57 ---- while (*t) h = ((h << 1) ^ *t++) % TABLE_SIZE; /* h = (h * 128 + *t++) % TABLE_SIZE; */ + if (h < 0L) h = -h; } p = table[h]; -- Jeff Bauer jtbauer@acns.fsu.edu FSU Academic Computing & Network Services (904) 644-2591 x. 131
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads