From b27025fc6f9e7d60de5901d7b14c158f3a8aed1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 17 Jul 2013 19:50:02 +0200 Subject: [PATCH] Compiler: Fixed __INIT() prototype detection. The __INIT() prototype detection in the decode_value() case was off by one in the previous commit. With this fix all of the known issues introduced by the __INIT() changes seem to be fixed. --- src/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/program.c b/src/program.c index 282e514c0f..c419ba2374 100644 --- a/src/program.c +++ b/src/program.c @@ -3930,7 +3930,8 @@ struct program *end_first_pass(int finish) } else if (finish == 2) { /* Called from decode_value(). */ e = low_find_lfun(Pike_compiler->new_program, LFUN___INIT); - if ((e != -1) && !ID_FROM_INT(Pike_compiler->new_program, e)->func.offset) { + if ((e != -1) && + (ID_FROM_INT(Pike_compiler->new_program, e)->func.offset == -1)) { /* Just a prototype. Make sure not to call it. */ e = -1; } -- GitLab