[nga-c] corrected fix for script:name (issue #99)

FossilOrigin-Name: eca3b588f990932f2161d869df338c8cb4f96bd17b13a1fcd741526661ea3e4a
This commit is contained in:
crc 2024-07-18 10:28:00 +00:00
parent 25420eea5d
commit 704d400029

View file

@ -566,7 +566,7 @@ V scripting_include_plain(NgaState *vm) {
}
V scripting_name(NgaState *vm) {
if ((vm->sys_argc - 2) <= 0)
if (vm->sys_argc == 1)
stack_push(vm, string_inject(vm, "<none>", stack_pop(vm)));
else
stack_push(vm, string_inject(vm, vm->sys_argv[1], stack_pop(vm)));