Unverified Commit d82e9189 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4917 from dearblue/va_end

Call `va_end()` before return
parents 9174b18f 00f5c921
......@@ -897,7 +897,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
}
break;
case '|':
if (opt_skip && i == argc) return argc;
if (opt_skip && i == argc) goto finish;
opt = TRUE;
break;
case '?':
......@@ -1004,6 +1004,8 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
if (!c && argc > i) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
}
finish:
va_end(ap);
return i;
}
......
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