summary refs log tree commit diff
path: root/lib/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hashtable.c')
-rw-r--r--lib/hashtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 2015b9c..e7799ad 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -108,9 +108,9 @@ int hashtable_remove(HashTable ht, char* key) {
 
 	for (int i = 0; i < bucket->length; ++i) {
 		HashTableData* data = &bucket->data[i];
-		if (strcmp(data->key, key) == 0) {
+		if (!data->deleted && strcmp(data->key, key) == 0) {
 			data->deleted = 1;
-			return 0;
+			return 1;
 		}
 	}