global-functions: $CharacterMultiply: return early on length zero...

... as :for loop counts backwards and would return two
character otherwise.
This commit is contained in:
Christian Hesse 2026-01-06 13:43:11 +01:00
parent 6990084d98
commit 0ceedab5db

View file

@ -243,6 +243,10 @@
:local Str [ :tostr $1 ];
:local Num [ :tonum $2 ];
:if ($Num = 0) do={
:return "";
}
:local Return "";
:for I from=1 to=$Num do={
:set Return ($Return . $Str);