From 840cffa032020f3184338071addb4f4be6c727ec Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Mon, 20 Feb 2023 17:31:44 +0100 Subject: [PATCH] correct default memory allocation --- storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage.c b/storage.c index 4a559f2..54815e2 100644 --- a/storage.c +++ b/storage.c @@ -21,7 +21,7 @@ int memory (int nb) if ((nb != -1) && (nb != size_tab (storage))) { storage = resize_tab (storage, nb); } - if (size_tab (storage) == -1) { + if (nb == -1) { memory (DEFAULT_STORAGE_SIZE); } return size_tab (storage); -- 2.30.2