summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-10 00:26:41 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-10 00:26:41 +0000
commite5dc8988af97526c5831bd347358ad2795a0834e (patch)
tree6b4a6a095386b85168ee5c4ffae2c6380e7b58a0 /string.c
parent17897462b22d185dba18aba4f3405f17ad689cae (diff)
* string.c (rb_str_inspect): CHAR_ESC_LEN should be 13.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index deab22b9e7..2dcc3305af 100644
--- a/string.c
+++ b/string.c
@@ -4048,7 +4048,7 @@ rb_str_inspect(VALUE str)
{
rb_encoding *enc = STR_ENC_GET(str);
const char *p, *pend, *prev;
-#define CHAR_ESC_LEN 12 /* sizeof(\x{ hex of 32bit unsigned int }) */
+#define CHAR_ESC_LEN 13 /* sizeof(\x{ hex of 32bit unsigned int } \0) */
char buf[CHAR_ESC_LEN + 1];
VALUE result = rb_str_buf_new(0);
rb_encoding *resenc = rb_default_internal_encoding();