Fix #3 (Empty containers & IN_STR operator).
This commit is contained in:
1 parent
6464acff57
commit
e21b45d9ac
6 files changed
+15
-3
No files matched your search
@@ -596,12 +596,15 @@
|
||||
M_C3(array_, name,_clean)(array); \
|
||||
char c = fgetc(file); \
|
||||
if (c != '[') return false; \
|
||||
c = fgetc(file); \
|
||||
if (c == ']') return true; \
|
||||
ungetc(c, file); \
|
||||
type item; \
|
||||
M_GET_INIT oplist (item); \
|
||||
do { \
|
||||
bool b = M_GET_IN_STR oplist (item, file); \
|
||||
c = fgetc(file); \
|
||||
if (!b) { /* How to push back char in stream ? */ break; } \
|
||||
if (!b) { break; } \
|
||||
M_C3(array_, name, _push_back)(array, item); \
|
||||
} while (c == M_GET_SEPARATOR oplist && !feof(file) && !ferror(file)); \
|
||||
M_GET_CLEAR oplist (item); \
|
||||
|
||||
Reference in new issue
Block a user