Skip to content

Commit

Permalink
Yikes
Browse files Browse the repository at this point in the history
  • Loading branch information
h3x4n1um committed Jun 16, 2019
1 parent 128620d commit 5c69460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion rton-json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# semver
set(VERSION_MAJOR 2)
set(VERSION_MINOR 6)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)

# configure a header file to pass some of the CMake settings
# to the source code
Expand Down
12 changes: 4 additions & 8 deletions rton-json/src/json2rton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ uint64_t unsigned_RTON_num2int(std::vector <uint8_t> q);

std::unordered_map <std::string, uint64_t> map_0x91;
std::unordered_map <std::string, uint64_t> map_0x93;
uint64_t cnt_0x91;
uint64_t cnt_0x93;

int write_RTON(json js);

Expand Down Expand Up @@ -133,9 +131,8 @@ int write_RTON_block(json js){
output.write(reinterpret_cast<const char*> (&ascii), sizeof ascii);
write_unsigned_RTON_num(int2unsigned_RTON_num(temp.size()));
output << temp;
debug_js["RTON Stats"]["0x91 Stack"].push_back(to_hex_string(int2unsigned_RTON_num(cnt_0x91)) + ": " + temp);
++cnt_0x91;
map_0x91[temp] = cnt_0x91;
debug_js["RTON Stats"]["0x91 Stack"].push_back(to_hex_string(int2unsigned_RTON_num(map_0x91.size() - 1)) + ": " + temp);
map_0x91[temp] = map_0x91.size();
}
else{
debug_js["RTON Stats"]["List of Bytecodes"].push_back(to_hex_string(output.tellp()) + ": " + to_hex_string(ascii_stack));
Expand All @@ -151,9 +148,8 @@ int write_RTON_block(json js){
write_unsigned_RTON_num(int2unsigned_RTON_num(utf8_size));
write_unsigned_RTON_num(int2unsigned_RTON_num(temp.size()));
output << temp;
debug_js["RTON Stats"]["0x93 Stack"].push_back(to_hex_string(int2unsigned_RTON_num(cnt_0x93)) + ": " + temp);
++cnt_0x93;
map_0x93[temp] = cnt_0x93;
debug_js["RTON Stats"]["0x93 Stack"].push_back(to_hex_string(int2unsigned_RTON_num(map_0x93.size() - 1)) + ": " + temp);
map_0x93[temp] = map_0x93.size();
}
else{
debug_js["RTON Stats"]["List of Bytecodes"].push_back(to_hex_string(output.tellp()) + ": " + to_hex_string(utf8_stack));
Expand Down

0 comments on commit 5c69460

Please sign in to comment.