From 4d11a69ba2279c6e80d8ef57c312d7e7f92eafe4 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Fri, 24 Apr 2015 23:47:54 +0000 Subject: [PATCH] [NTVDM] Fix INT 21h, AH = 29h: stop at the first non-printable character, make all the characters uppercase in the FCB. svn path=/trunk/; revision=67387 --- reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c index b2b93069826..6fdac89a3ad 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c @@ -1794,7 +1794,7 @@ VOID WINAPI DosInt21h(LPWORD Stack) /* Parse the file name */ i = 0; - while (*FileName && (i < 8)) + while ((*FileName >= 0x20) && (i < 8)) { if (*FileName == '.') break; else if (*FileName == '*') @@ -1803,7 +1803,7 @@ VOID WINAPI DosInt21h(LPWORD Stack) break; } - Fcb->FileName[i++] = *FileName++; + Fcb->FileName[i++] = RtlUpperChar(*FileName++); } /* Fill the whole field with blanks only if bit 2 is not set */ @@ -1813,14 +1813,14 @@ VOID WINAPI DosInt21h(LPWORD Stack) } /* Skip to the extension part */ - while (*FileName && *FileName != '.') FileName++; + while (*FileName >= 0x20 && *FileName != '.') FileName++; if (*FileName == '.') FileName++; /* Now parse the extension */ i = 0; FillChar = ' '; - while (*FileName && (i < 3)) + while ((*FileName >= 0x20) && (i < 3)) { if (*FileName == '*') { @@ -1828,7 +1828,7 @@ VOID WINAPI DosInt21h(LPWORD Stack) break; } - Fcb->FileExt[i++] = *FileName++; + Fcb->FileExt[i++] = RtlUpperChar(*FileName++); } /* Fill the whole field with blanks only if bit 3 is not set */