Fixed CRCs being sent to the UI as strings.

Fixes #227.
This commit is contained in:
WrinklyNinja
2014-08-21 22:44:55 +01:00
parent 05d20d3584
commit 169484aa5d
+1 -1
View File
@@ -65,7 +65,7 @@ namespace loot {
// Using the definition at <http://www.json.org/>.
// Version numbers should be kept as strings though.
std::regex numbers("\"(?!version)(\\w+)\": \"(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)\"", std::regex::ECMAScript);
std::regex numbers("\"(?!version)([^\"]+)\": \"(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)\"", std::regex::ECMAScript);
json = std::regex_replace(json, numbers, "\"$1\": $2");