This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 2d2d9817 fix: monitor dumps 0xffffff prefix for signed char (#2482)
2d2d9817 is described below
commit 2d2d98173836b3945083a77f27f89f9c618efcba
Author: Twice <[email protected]>
AuthorDate: Sat Aug 10 10:34:33 2024 +0800
fix: monitor dumps 0xffffff prefix for signed char (#2482)
---
src/common/string_util.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/common/string_util.cc b/src/common/string_util.cc
index 4a4d79a8..476e3173 100644
--- a/src/common/string_util.cc
+++ b/src/common/string_util.cc
@@ -367,9 +367,7 @@ std::string EscapeString(std::string_view s) {
if (isprint(ch)) {
str += ch;
} else {
- char buffer[16];
- snprintf(buffer, sizeof(buffer), "\\x%02x", ch);
- str += buffer;
+ str += fmt::format("\\x{:02x}", (unsigned char)ch);
}
}
}