From 885d929398cf6962f3b0d292cf44105976f6c848 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 6 Jan 2017 14:53:00 +0900 Subject: Improve capacity enhancing conditions --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index 976c34687..b4746545a 100644 --- a/src/string.c +++ b/src/string.c @@ -169,7 +169,7 @@ str_buf_cat(mrb_state *mrb, struct RString *s, const char *ptr, size_t len) capa *= 2; } else { - goto size_error; + capa = total; } } if (capa < total || capa > MRB_INT_MAX) { -- cgit v1.2.3