Commit 18f39301 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1636 from cremno/mrb_get_args-z-errmsg

use the same error msg as mrb_str_to_cstr/CRuby
parents 0d8737c1 edf93c8b
...@@ -522,7 +522,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...) ...@@ -522,7 +522,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
s = mrb_str_ptr(ss); s = mrb_str_ptr(ss);
len = (mrb_int)strlen(s->ptr); len = (mrb_int)strlen(s->ptr);
if (len < s->len) { if (len < s->len) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "String contains NUL"); mrb_raise(mrb, E_ARGUMENT_ERROR, "string contains null byte");
} }
else if (len > s->len) { else if (len > s->len) {
mrb_str_modify(mrb, s); mrb_str_modify(mrb, s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment