[Scummvm-git-logs] scummvm master -> 70d372603410794d2b7a1c4395423e551fe3e1f7
digitall
dgturner at iee.org
Thu Jan 12 05:45:47 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
70d3726034 COMMON: Replace sprintf() with safer String::format() in JSON module.
Commit: 70d372603410794d2b7a1c4395423e551fe3e1f7
https://github.com/scummvm/scummvm/commit/70d372603410794d2b7a1c4395423e551fe3e1f7
Author: D G Turner (digitall at scummvm.org)
Date: 2017-01-12T04:50:45Z
Commit Message:
COMMON: Replace sprintf() with safer String::format() in JSON module.
Changed paths:
common/json.cpp
diff --git a/common/json.cpp b/common/json.cpp
index 792d196..c8caf01 100644
--- a/common/json.cpp
+++ b/common/json.cpp
@@ -979,17 +979,13 @@ String JSONValue::stringifyImpl(size_t const indentDepth) const {
if (isinf(_numberValue) || isnan(_numberValue))
ret_string = "null";
else {
- char str[80];
- sprintf(str, "%g", _numberValue);
- ret_string = str;
+ ret_string = String::format("%g", _numberValue);
}
break;
}
case JSONType_IntegerNumber: {
- char str[80];
- sprintf(str, "%lld", _integerValue);
- ret_string = str;
+ ret_string = String::format("%lld", _integerValue);
break;
}
More information about the Scummvm-git-logs
mailing list