mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-31 10:46:16 +00:00
12 lines
351 B
Plaintext
12 lines
351 B
Plaintext
--- agrep/sgrep.c.orig Mon Apr 26 23:15:06 2004
|
|
+++ agrep/sgrep.c Mon Apr 26 23:15:33 2004
|
|
@@ -1539,7 +1539,7 @@
|
|
hash = TR[*text];
|
|
hash = (hash << 3) + TR[*(text-1)];
|
|
shift = SHIFT_2[hash];
|
|
- while(shift) {
|
|
+ while(shift && text <= textend) {
|
|
text = text + shift;
|
|
hash = (TR[*text] << 3) + TR[*(text-1)];
|
|
shift = SHIFT_2[hash];
|