Fix m_core_fscan_* in case of EOF

This commit is contained in:
Patrick Pelissier committed 2020-06-19 21:02:17 +02:00
1 parent 5ce6ccde3d
commit 44b3895698
1 file changed
+1 -1
+1 -1
View File
@@ -1513,7 +1513,7 @@ m_core_fscan_bool (bool *ptr, FILE *f)
static inline bool \
name (type *ptr, FILE *f) \
{ \
return fscanf(f, format, ptr); \
return fscanf(f, format, ptr) == 1; \
}
M_FSCAN_DEFAULT_TYPE_DEF(m_core_fscan_char, char, "%c")
M_FSCAN_DEFAULT_TYPE_DEF(m_core_fscan_schar, signed char, "%hhd")