diff --git a/main/gbx/gbx_c_collection.c b/main/gbx/gbx_c_collection.c index 76f2e3dd7..6a2eff3b0 100644 --- a/main/gbx/gbx_c_collection.c +++ b/main/gbx/gbx_c_collection.c @@ -69,6 +69,7 @@ static void remove_key(CCOLLECTION *col, const char *key, int len) { void *value; HASH_NODE *last; + HASH_NODE *save; void *save_enum; if (len == 0) @@ -77,12 +78,16 @@ static void remove_key(CCOLLECTION *col, const char *key, int len) return; } - value = HASH_TABLE_lookup(col->hash_table, key, len, FALSE); + save = col->hash_table->last; + + value = HASH_TABLE_lookup(col->hash_table, key, len, TRUE); + + last = col->hash_table->last; + col->hash_table->last = save; + if (value == NULL) return; - last = col->hash_table->last; - if (last) { save_enum = GB_BeginEnum(col); diff --git a/main/gbx/gbx_stream.c b/main/gbx/gbx_stream.c index 8aca08971..f739ce9c5 100644 --- a/main/gbx/gbx_stream.c +++ b/main/gbx/gbx_stream.c @@ -509,7 +509,7 @@ void STREAM_write(STREAM *stream, void *addr, int len) if (len <= 0) return; - + if (stream->common.redirected) stream = stream->common.redirect;