1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-24 04:07:41 +00:00

Fix janet_table_remove returning the key instead of the value

This commit is contained in:
GrayJack
2020-07-01 20:05:07 -03:00
parent e08235b575
commit 7ea1c7d85a

View File

@@ -173,7 +173,7 @@ Janet janet_table_rawget(JanetTable *t, Janet key) {
Janet janet_table_remove(JanetTable *t, Janet key) {
JanetKV *bucket = janet_table_find(t, key);
if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
Janet ret = bucket->key;
Janet ret = bucket->value;
t->count--;
t->deleted++;
bucket->key = janet_wrap_nil();