Skip to content

Commit

Permalink
[fix #132] rb_str_xcopy_uchars() should check whether passed object i…
Browse files Browse the repository at this point in the history
…s string
  • Loading branch information
Watson1978 committed Jul 20, 2012
1 parent 1eb0e21 commit 1efd63f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions string.c
Expand Up @@ -1471,6 +1471,7 @@ rb_str_xcopy_uchars(VALUE str, long *len_p)
UChar *chars = NULL;
long len = 0;

str = (VALUE)str_need_string(str);
if (IS_RSTR(str)) {
rb_str_t *rstr = RSTR(str);
len = str_length(rstr);
Expand Down

0 comments on commit 1efd63f

Please sign in to comment.