[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;
|
||||
|
||||
if (! pic_proc_p(v)) {
|
||||
goto typeerror;
|
||||
}
|
||||
if (! pic_proc_func_p(pic_proc_ptr(v))) {
|
||||
if (! pic_proc_func_p(proc)) {
|
||||
goto typeerror;
|
||||
}
|
||||
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);
|
||||
|
||||
typeerror:
|
||||
pic_error(pic, "expected parameter");
|
||||
UNREACHABLE();
|
||||
pic_errorf(pic, "expected parameter, but got ~s", v);
|
||||
}
|
||||
|
||||
static pic_value
|
||||
|
|
Loading…
Reference in New Issue