From 320977e1fa550f438b1eed961801afc4ed153afa Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 9 Mar 2017 22:35:29 +0100 Subject: [PATCH] Fix bug in case of empty array and the type doesn't flush the stream. --- m-array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m-array.h b/m-array.h index 7741c5a8..0353e468 100644 --- a/m-array.h +++ b/m-array.h @@ -600,9 +600,9 @@ M_GET_INIT oplist (item); \ do { \ bool b = M_GET_IN_STR oplist (item, file); \ - if (!b) { M_GET_CLEAR oplist (item); return false; } \ - M_C3(array_, name, _push_back)(array, item); \ c = fgetc(file); \ + if (!b) { /* How to push back char in stream ? */ break; } \ + M_C3(array_, name, _push_back)(array, item); \ } while (c == M_GET_SEPARATOR oplist && !feof(file) && !ferror(file)); \ M_GET_CLEAR oplist (item); \ return c == ']'; \