From 8731cb435d1f6d5f22bbfe06d9fc30bdf9069373 Mon Sep 17 00:00:00 2001 From: mccallum Date: Thu, 26 Oct 1995 00:48:55 +0000 Subject: [PATCH] (coll_hash_next): Set STATE to 0 before returning when the list is exhausted. This interacts with [Dictionary -freeEnumState:] and [Set -freeEnumState]. This will all be cleaned up when we start using Albin Jones' tables. (This bug found by Allan Clearwaters.) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@634 72102866-910b-0410-8b05-ffd578937521 --- Source/collhash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/collhash.c b/Source/collhash.c index 18bcd58c3..853c516c3 100644 --- a/Source/collhash.c +++ b/Source/collhash.c @@ -1,5 +1,5 @@ /* Hash tables for Objective C internal structures - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -290,6 +290,7 @@ coll_hash_next (coll_cache_ptr cache, void** state) } else { (*objc_free)(*state); + *state = (void*)0; return 0; } }