[bugfix] using uninitializing variable
This commit is contained in:
parent
39b1e6c6bc
commit
c44803d238
|
@ -48,10 +48,7 @@ get_var_from_proc(pic_state *pic, struct pic_proc *proc)
|
||||||
{
|
{
|
||||||
pic_value v;
|
pic_value v;
|
||||||
|
|
||||||
if (! pic_proc_p(v)) {
|
if (! pic_proc_func_p(proc)) {
|
||||||
goto typeerror;
|
|
||||||
}
|
|
||||||
if (! pic_proc_func_p(pic_proc_ptr(v))) {
|
|
||||||
goto typeerror;
|
goto typeerror;
|
||||||
}
|
}
|
||||||
if (pic_proc_cv_size(pic, proc) != 1) {
|
if (pic_proc_cv_size(pic, proc) != 1) {
|
||||||
|
@ -64,8 +61,7 @@ get_var_from_proc(pic_state *pic, struct pic_proc *proc)
|
||||||
return pic_var_ptr(v);
|
return pic_var_ptr(v);
|
||||||
|
|
||||||
typeerror:
|
typeerror:
|
||||||
pic_error(pic, "expected parameter");
|
pic_errorf(pic, "expected parameter, but got ~s", v);
|
||||||
UNREACHABLE();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
|
|
Loading…
Reference in New Issue