Commit f89e1158 authored by Markus Amsler's avatar Markus Amsler Committed by Alexandre Julliard

Make environment variables uppercase.

parent be2c020c
......@@ -158,6 +158,7 @@ static void MZ_FillPSP( LPVOID lpPSP, LPCSTR cmdtail, int length )
static WORD MZ_InitEnvironment( LPCSTR env, LPCSTR name )
{
unsigned sz=0;
unsigned i=0;
WORD seg;
LPSTR envblk;
......@@ -171,6 +172,16 @@ static WORD MZ_InitEnvironment( LPCSTR env, LPCSTR name )
if (env) {
memcpy(envblk,env,sz);
} else envblk[0]=0;
/* DOS environment variables are uppercase */
while (envblk[i]){
while (envblk[i] != '='){
if (envblk[i]>='a' && envblk[i] <= 'z'){
envblk[i] -= 32;
}
i++;
}
i += strlen(envblk+i) + 1;
}
/* DOS 3.x: the block contains 1 additional string */
*(WORD*)(envblk+sz)=1;
/* being the program name itself */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment