summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Ziermann <b@loet.de>2015-11-27 11:37:20 +0100
committerLubomir Rintel <lkundrak@v3.sk>2015-11-27 11:58:46 +0100
commitb0e9b25cf4d73255c90a201be0ec3e55b2479024 (patch)
tree2cb9171b3abdad52a95346c114a93553925ce36e
parent4a350d3b3ce179ae7a543465828a071fabc345f8 (diff)
downloaddev86-b0e9b25cf4d73255c90a201be0ec3e55b2479024.tar.gz
libc/msdos: __mkargv es register changed
In __mkargv.o the es register is modified during the processing of the arguments and never restored.
-rw-r--r--libc/msdos/msdos.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/msdos/msdos.c b/libc/msdos/msdos.c
index f9bfb9b..973b0a6 100644
--- a/libc/msdos/msdos.c
+++ b/libc/msdos/msdos.c
@@ -181,6 +181,8 @@ char ** __argv;
{
int length, i, argc=1, s=0;
unsigned char *ptr, *p;
+ int es=__get_es();
+
__set_es(__psp); /* Pointer to the args */
length = __peek_es(0x80); /* Length of cmd line */
if( length > 0 )
@@ -212,6 +214,7 @@ char ** __argv;
}
__argv[argc] = 0;
}
+ __set_es(es);
}
#endif