mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-16 14:09:32 +00:00
global-functions: $CharacterMultiply: return early on length zero...
... as :for loop counts backwards and would return two character otherwise.
This commit is contained in:
parent
6990084d98
commit
0ceedab5db
1 changed files with 4 additions and 0 deletions
|
|
@ -243,6 +243,10 @@
|
||||||
:local Str [ :tostr $1 ];
|
:local Str [ :tostr $1 ];
|
||||||
:local Num [ :tonum $2 ];
|
:local Num [ :tonum $2 ];
|
||||||
|
|
||||||
|
:if ($Num = 0) do={
|
||||||
|
:return "";
|
||||||
|
}
|
||||||
|
|
||||||
:local Return "";
|
:local Return "";
|
||||||
:for I from=1 to=$Num do={
|
:for I from=1 to=$Num do={
|
||||||
:set Return ($Return . $Str);
|
:set Return ($Return . $Str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue