From 4a28b8ba082b9e634907e494cf23b866d3d6c9e1 Mon Sep 17 00:00:00 2001 From: H3x4n1um Date: Thu, 18 Feb 2021 07:41:42 +0700 Subject: [PATCH] Fix #13 --- rton-json/include/rton-json.hpp | 2 +- rton-json/src/rton2json.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rton-json/include/rton-json.hpp b/rton-json/include/rton-json.hpp index bec2991..7755a82 100644 --- a/rton-json/include/rton-json.hpp +++ b/rton-json/include/rton-json.hpp @@ -6,7 +6,7 @@ #include "include/json_fifo.hpp" const std::string architecture = std::to_string(uint16_t(round(log2(UINTPTR_MAX)))) + "-bit"; -const std::string ver = "3.1.0"; +const std::string ver = "3.1.1"; std::string to_hex_string(const uint64_t &q); std::string to_hex_string(const std::vector &a); diff --git a/rton-json/src/rton2json.cpp b/rton-json/src/rton2json.cpp index 3e2aa09..fc32828 100644 --- a/rton-json/src/rton2json.cpp +++ b/rton-json/src/rton2json.cpp @@ -287,7 +287,7 @@ json_fifo::json decode_RTON_chunk(const std::vector &byte_array, std:: json_fifo::json decode_RTON(const std::vector &byte_array, std::size_t &pos, std::vector &array_0x91, std::vector &array_0x93, json_fifo::json &rton_info){ std::size_t pre_pos = pos; - json_fifo::json res, + json_fifo::json res = json_fifo::json::object(), js_key = decode_RTON_chunk(byte_array, pos, array_0x91, array_0x93, rton_info); while(js_key.size()){ if(!js_key.is_string()) throw std::logic_error("Error! Key at " + to_hex_string(pre_pos) + " is not a string!!!");