mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (str_buf_cat): Fix capa size for embed string.
Fix bug in r55547. [Bug #12536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
83a5457fa7
commit
2bb292fccf
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jul 15 21:30:38 2016 Naohisa Goto <ngotogenome@gmail.com>
|
||||||
|
|
||||||
|
* string.c (str_buf_cat): Fix capa size for embed string.
|
||||||
|
Fix bug in r55547. [Bug #12536]
|
||||||
|
|
||||||
Fri Jul 15 18:13:15 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
Fri Jul 15 18:13:15 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||||
|
|
||||||
* gems/bundled_gems: update latest gems.
|
* gems/bundled_gems: update latest gems.
|
||||||
|
|
2
string.c
2
string.c
|
@ -2570,7 +2570,7 @@ str_buf_cat(VALUE str, const char *ptr, long len)
|
||||||
rb_str_modify(str);
|
rb_str_modify(str);
|
||||||
if (len == 0) return 0;
|
if (len == 0) return 0;
|
||||||
if (STR_EMBED_P(str)) {
|
if (STR_EMBED_P(str)) {
|
||||||
capa = RSTRING_EMBED_LEN_MAX + termlen - 1;
|
capa = RSTRING_EMBED_LEN_MAX + 1 - termlen;
|
||||||
sptr = RSTRING(str)->as.ary;
|
sptr = RSTRING(str)->as.ary;
|
||||||
olen = RSTRING_EMBED_LEN(str);
|
olen = RSTRING_EMBED_LEN(str);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue