(detect_loop): There's no loop if k->top is NULL.

This commit is contained in:
Jim Meyering committed 1999-08-22 16:10:24 +00:00
1 parent 5157fd957e
commit 53e173cca6
1 file changed
+1 -1
+1 -1
View File
@@ -315,7 +315,7 @@ scan_zeros (struct item *k)
static void
detect_loop (struct item *k)
{
if (k->count > 0)
if (k->count > 0 && k->top)
{
while (k && k->count > 0)
{