mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
[nga-c] now report 0 for script:arguments
count if not running a program
FossilOrigin-Name: 926e685b338c07722000d4d4d659674fdbcfb77c5f970283596f10ec18ad8b1a
This commit is contained in:
parent
565d567523
commit
25420eea5d
2 changed files with 5 additions and 1 deletions
|
@ -53,6 +53,7 @@
|
||||||
- new "-p" option to run non-Unu format source files
|
- new "-p" option to run non-Unu format source files
|
||||||
- now report "<none>" for `script:name` if no file is being
|
- now report "<none>" for `script:name` if no file is being
|
||||||
run
|
run
|
||||||
|
- now report 0 for `script:arguments` if not running a program
|
||||||
|
|
||||||
Future Notes
|
Future Notes
|
||||||
|
|
||||||
|
|
|
@ -551,7 +551,10 @@ V scripting_arg(NgaState *vm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
V scripting_arg_count(NgaState *vm) {
|
V scripting_arg_count(NgaState *vm) {
|
||||||
stack_push(vm, vm->sys_argc - 2);
|
if ((vm->sys_argc - 2) <= 0)
|
||||||
|
stack_push(vm, 0);
|
||||||
|
else
|
||||||
|
stack_push(vm, vm->sys_argc - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
V scripting_include(NgaState *vm) {
|
V scripting_include(NgaState *vm) {
|
||||||
|
|
Loading…
Reference in a new issue