Skip to content
Permalink
Browse files
Small refactoring: should use RSTR_CAPA
  • Loading branch information
ksss committed Jan 2, 2017
1 parent 07167b8 commit 30b6648b9c53f8c3f5156910758cb37eb0d654a7
Showing 1 changed file with 1 addition and 4 deletions.
@@ -154,10 +154,7 @@ str_buf_cat(mrb_state *mrb, struct RString *s, const char *ptr, size_t len)
off = ptr - RSTR_PTR(s);
}

if (RSTR_EMBED_P(s))
capa = RSTRING_EMBED_LEN_MAX;
else
capa = s->as.heap.aux.capa;
capa = RSTR_CAPA(s);
if (capa <= RSTRING_EMBED_LEN_MAX)
capa = RSTRING_EMBED_LEN_MAX+1;

0 comments on commit 30b6648

Please sign in to comment.