mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix unnecessary exception in mrb_get_args with "z" format.
This commit is contained in:
+1
-1
@@ -487,7 +487,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
|
||||
if (i < argc) {
|
||||
ss = to_str(mrb, *sp++);
|
||||
s = mrb_str_ptr(ss);
|
||||
if (strlen(s->ptr) != s->len) {
|
||||
if (strlen(s->ptr) < s->len) {
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "String contains NUL");
|
||||
}
|
||||
*ps = s->ptr;
|
||||
|
||||
Reference in New Issue
Block a user