diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-07-22 09:54:57 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-07-22 09:56:48 +0900 |
commit | cf7d07570f50ef9c16007019afcff11ba6500d70 (patch) | |
tree | 8e2be0ae577d296660e1372fc5739e6ab6ae2a79 /ext/objspace | |
parent | 7223c0da152114c84e1c4261a282faaea21646fb (diff) |
Dump non-ASCII char as unsigned
Non-ASCII code may be negative on platforms plain char is signed.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6166
Diffstat (limited to 'ext/objspace')
-rw-r--r-- | ext/objspace/objspace_dump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c index e4f1216a9a..24a2b0b245 100644 --- a/ext/objspace/objspace_dump.c +++ b/ext/objspace/objspace_dump.c @@ -142,7 +142,7 @@ dump_append_sizet(struct dump_config *dc, const size_t number) } static void -dump_append_c(struct dump_config *dc, char c) +dump_append_c(struct dump_config *dc, unsigned char c) { if (c <= 0x1f) { const unsigned int width = (sizeof(c) * CHAR_BIT / 4) + 5; |