From 1246fcc42bc44f624a1c8bd855fd1dd82d51f228 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Aug 2016 01:15:02 +0300 Subject: Reduce memory usage in vectors. --- src/emap/craft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/emap/craft.c') diff --git a/src/emap/craft.c b/src/emap/craft.c index c33ec64..f9f6f54 100644 --- a/src/emap/craft.c +++ b/src/emap/craft.c @@ -205,7 +205,7 @@ struct craft_vardata *craft_str_to_craft(const char *craftstr) strutil_free(craftdata); return false; } - VECTOR_ENSURE(crslot->items, slot + 1, 1); + VECTOR_ENSURE(crslot->items, 1, 1); VECTOR_INSERTZEROED(crslot->items, slot); struct item_pair *pair = &VECTOR_INDEX(crslot->items, slot); pair->index = index; -- cgit v1.2.3-70-g09d2