Parcourir la source

vsnprintf: Don't error out on end of format string.

Branimir Karadžić il y a 8 ans
Parent
commit
e760d0aa9d
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      src/string.cpp

+ 5 - 2
src/string.cpp

@@ -581,9 +581,12 @@ namespace bx
 		while (_err->isOk() )
 		while (_err->isOk() )
 		{
 		{
 			char ch = '\0';
 			char ch = '\0';
-			read(&reader, ch, _err);
 
 
-			if (!_err->isOk() )
+			Error err;
+			read(&reader, ch, &err);
+
+			if (!_err->isOk()
+			||  !err.isOk() )
 			{
 			{
 				break;
 				break;
 			}
 			}