diff options
author | Andreas Ziermann <b@loet.de> | 2015-11-27 11:37:20 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-11-27 11:58:46 +0100 |
commit | b0e9b25cf4d73255c90a201be0ec3e55b2479024 (patch) | |
tree | 2cb9171b3abdad52a95346c114a93553925ce36e | |
parent | 4a350d3b3ce179ae7a543465828a071fabc345f8 (diff) | |
download | dev86-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.c | 3 |
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 |