Handle a little bit better the empty container case.
This commit is contained in:
1 parent
0483ae7028
commit
6464acff57
2 files changed
+3
-3
No files matched your search
@@ -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; } \
|
||||
|
||||
@@ -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); \
|
||||
|
||||
Reference in new issue
Block a user