Handle a little bit better the empty container case.

This commit is contained in:
Patrick Pelissier committed 2017-03-10 00:08:28 +01:00
1 parent 0483ae7028
commit 6464acff57
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -409,8 +409,8 @@
M_GET_INIT value_oplist (value); \
do { \
bool b = M_GET_IN_STR key_oplist (key, file); \
if (!b) { c = 0; break; } \
c = fgetc(file); \
if (!b) { break; } \
if (c != ':') { c = 0; break; } \
b = M_GET_IN_STR value_oplist (value, file); \
if (!b) { c = 0; break; } \
+2 -2
View File
@@ -515,9 +515,9 @@
M_GET_INIT oplist (item); \
do { \
bool b = M_GET_IN_STR oplist (item, file); \
if (!b) { c = 0; break; } \
M_C3(list_, name, _push_back)(list, item); \
c = fgetc(file); \
if (!b) { break; } \
M_C3(list_, name, _push_back)(list, item); \
} while (c == M_GET_SEPARATOR oplist && !feof(file) && !ferror(file)); \
M_GET_CLEAR oplist (item); \
M_C3(list_, name, _reverse)(list); \