Skip to content

Commit 8c429cd

Browse files
authored
Merge pull request #402 from msgpack/gc-guard
Packer_write_extension: guard on string being moved
2 parents 64fca29 + 5d55d7e commit 8c429cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ext/msgpack/packer_class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static VALUE Packer_write_extension(VALUE self, VALUE obj)
235235

236236
VALUE rb_ext_type = RSTRUCT_GET(obj, 0);
237237
if(!RB_TYPE_P(rb_ext_type, T_FIXNUM)) {
238-
rb_raise(rb_eRangeError, "integer %s too big to convert to `signed char'", RSTRING_PTR(rb_String(rb_ext_type)));
238+
rb_raise(rb_eRangeError, "integer %"PRIsVALUE" too big to convert to `signed char'", rb_ext_type);
239239
}
240240

241241
int ext_type = FIX2INT(rb_ext_type);

0 commit comments

Comments
 (0)