fix error index for script proc

This commit is contained in:
sonil 2023-11-06 20:30:26 +08:00
parent f411d75643
commit e60a53e63d
1 changed files with 3 additions and 7 deletions

View File

@ -1305,11 +1305,7 @@ int scriptExecProc(int sid, int proc)
} }
int v9 = script->procs[proc]; int v9 = script->procs[proc];
if (v9 == 0) { if (v9 == SCRIPT_PROC_NO_PROC) {
v9 = 1;
}
if (v9 == -1) {
return -1; return -1;
} }
@ -1323,8 +1319,8 @@ int scriptExecProc(int sid, int proc)
scriptLocateProcs(script); scriptLocateProcs(script);
v9 = script->procs[proc]; v9 = script->procs[proc];
if (v9 == 0) { if (v9 == SCRIPT_PROC_NO_PROC) {
v9 = 1; return -1;
} }
script->action = 0; script->action = 0;