diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c index 9008fb58b7..14dc161c9a 100644 --- a/src/rxgen/rpc_parse.c +++ b/src/rxgen/rpc_parse.c @@ -715,6 +715,9 @@ static void check_proc(definition *defp, token *tokp, int noname) int proc_split = 0; int proc_multi = 0; + if (PackageIndex < 0) + error("Procedure must be in a package!\n"); + tokp->kind = TOK_PROC; defp->def_kind = DEF_PROC; if (noname)