From d70f8d8f180f03f608629ed7970b21e6c166db66 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 13 Apr 2024 23:35:04 +0800 Subject: [PATCH] Update compiler.cpp --- src/compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 30f6e84a..0b29e4b6 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1244,7 +1244,6 @@ __EAT_DOTS_END: }else if constexpr(std::is_same_v){ ss << 'S'; for(char c: arg) ss.write_hex((unsigned char)c); - ss.write_hex((unsigned char)0); } ss << '\n'; }, token.value); @@ -1347,6 +1346,7 @@ __EAT_DOTS_END: else PK_FATAL_ERROR(); buffer[i/2] = c; } + buffer[s.size()/2] = 0; return std::pair(buffer, s.size()/2); }