global-functions: $ScriptLock: initialize earlier

This commit is contained in:
Christian Hesse 2021-12-09 12:51:19 +01:00
parent 9c87b5a222
commit cdcab4599a

View file

@ -888,6 +888,9 @@
:if ([ :typeof $ScriptLockOrder ] = "nothing") do={
:set ScriptLockOrder [ :toarray "" ];
}
:if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
}
:local JobCount do={
:local Script [ :tostr $1 ];
@ -928,10 +931,6 @@
:global ScriptLockOrder;
:if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
}
:while (true) do={
:local Pos [ :len ($ScriptLockOrder->$Script) ];
:set ($ScriptLockOrder->$Script->$Pos) $Add;