From e760d0aa9d95babd5f8c1c6ec5c75e9acba453c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 19 Feb 2017 21:22:11 -0800 Subject: [PATCH] vsnprintf: Don't error out on end of format string. --- src/string.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; }