diff --git a/Makefile b/Makefile index 06e6af6a6..9587a0482 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ K ?= K.sh MAJOR = 0 MINOR = 4 PATCH = 12 -BUILD = 18 +BUILD = 19 SOURCE := $(notdir $(wildcard src/bin/*)) CARCH = x86_64-linux-gnu \ arm-linux-gnueabihf \ diff --git a/src/lib/Krypto.ninja-bots.h b/src/lib/Krypto.ninja-bots.h index 3e6bf90de..1a847adb6 100644 --- a/src/lib/Krypto.ninja-bots.h +++ b/src/lib/Krypto.ninja-bots.h @@ -75,8 +75,7 @@ namespace ₿ { unordered_map> hotFn; public: void hotkey(const char &ch, function fn) { - if (!keylogger.valid()) - error("SH", string("Unable to set \"hotkey\" handler because display is a nullptr")); + if (!keylogger.valid()) return; if (hotFn.find(ch) != hotFn.end()) error("SH", string("Too many handlers for \"") + ch + "\" hotkey event"); hotFn[ch] = fn; @@ -640,7 +639,7 @@ namespace ₿ { vector*> gw_clients; vector*> ui_servers; private: - unordered_map headers = { + const unordered_map headers = { {200, "HTTP/1.1 200 OK" "\r\n" "Connection: keep-alive" "\r\n" "Accept-Ranges: bytes" @@ -677,7 +676,7 @@ namespace ₿ { + "\r\n" "Content-Length: " + to_string(content.length()) + "\r\n" "\r\n" - + content;; + + content; }; uWS::Group *listen( string &protocol,