mirror of
https://github.com/nineties/planckforth
synced 2025-01-13 08:01:10 +01:00
Fixed a bug of shift-args
This commit is contained in:
parent
f71413d42b
commit
6e30c23cce
1 changed files with 1 additions and 1 deletions
|
@ -1791,12 +1791,12 @@ v argc ! argv !
|
|||
\ Remove 1 arg, update argv and argc
|
||||
: shift-args ( -- )
|
||||
argc @ 1 = if exit then
|
||||
1 argc -!
|
||||
argc @ 1 do
|
||||
i 1+ arg \ argv[i+1]
|
||||
i cells argv @ + \ &argv[i]
|
||||
! \ copy argv[i+1] to argv[i]
|
||||
loop
|
||||
1 argc -!
|
||||
;
|
||||
|
||||
\ Take 1 arg and shift arguments
|
||||
|
|
Loading…
Reference in a new issue