summaryrefslogtreecommitdiffstats
path: root/dos/argv.c
diff options
context:
space:
mode:
Diffstat (limited to 'dos/argv.c')
-rw-r--r--dos/argv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dos/argv.c b/dos/argv.c
index 5535331a..4c835896 100644
--- a/dos/argv.c
+++ b/dos/argv.c
@@ -73,13 +73,13 @@ int __parse_argv(char ***argv, const char *str)
if ( ! *p )
break;
}
- q--; /* Point to final null */
/* Now create argv */
arg = ALIGN_UP(q,char *);
*argv = arg;
*arg++ = mem; /* argv[0] */
+ q--; /* Point q to final null */
for ( r = mem ; r < q ; r++ ) {
if ( *r == '\0' ) {
*arg++ = r+1;