diff --git a/src/string.cpp b/src/string.cpp index 6254588..3c81700 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -581,9 +581,12 @@ namespace bx while (_err->isOk() ) { char ch = '\0'; - read(&reader, ch, _err); - if (!_err->isOk() ) + Error err; + read(&reader, ch, &err); + + if (!_err->isOk() + || !err.isOk() ) { break; }