From 169484aa5d48c802e0dddd761f7a334fc27c0e09 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Thu, 21 Aug 2014 22:44:55 +0100 Subject: [PATCH] Fixed CRCs being sent to the UI as strings. Fixes #227. --- src/backend/json.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/json.h b/src/backend/json.h index 6a582dec..15c94c99 100644 --- a/src/backend/json.h +++ b/src/backend/json.h @@ -65,7 +65,7 @@ namespace loot { // Using the definition at . // 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");