Improve capacity enhancing conditions

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-01-06 14:53:00 +09:00
parent c6a1172592
commit 885d929398
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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) {