From: Tormod Volden Date: Fri, 8 May 2015 20:29:49 +0000 (+0200) Subject: execve() fix for 6502 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f5ff0bc18f90e3986b9b7f80aba60db646ff24ed;p=FUZIX.git execve() fix for 6502 Signed-off-by: Tormod Volden --- diff --git a/Kernel/syscall_exec16.c b/Kernel/syscall_exec16.c index 77921130..603c634f 100644 --- a/Kernel/syscall_exec16.c +++ b/Kernel/syscall_exec16.c @@ -218,8 +218,8 @@ arg_t _execve(void) // Shove argc and the address of argv just below envp #ifdef CONFIG_CALL_R2L /* Arguments are stacked the 'wrong' way around */ - uputw((uint16_t) nargv, nenvp - 1); - uputw((uint16_t) argc, nenvp - 2); + uputw((uint16_t) nargv, nenvp - 2); + uputw((uint16_t) argc, nenvp - 1); #else uputw((uint16_t) nargv, nenvp - 1); uputw((uint16_t) argc, nenvp - 2);