summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-01-06 14:53:00 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-01-06 14:53:00 +0900
commit885d929398cf6962f3b0d292cf44105976f6c848 (patch)
tree8b4c9748b619f4ca2f646af5b3f12b7827727b95 /src/string.c
parentc6a11725923090278bb4941579751650d9aaebce (diff)
downloadmruby-885d929398cf6962f3b0d292cf44105976f6c848.tar.gz
mruby-885d929398cf6962f3b0d292cf44105976f6c848.zip
Improve capacity enhancing conditions
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
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) {