Alexandre Julliard : winevdm: Move the DOS memory range check to not trigger for Win16 apps.
Alexandre Julliard
julliard at winehq.org
Mon May 5 07:14:54 CDT 2008
Module: wine
Branch: master
Commit: f315d0291da898b47e3651b6fa2666b1d791010c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f315d0291da898b47e3651b6fa2666b1d791010c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon May 5 13:01:45 2008 +0200
winevdm: Move the DOS memory range check to not trigger for Win16 apps.
---
programs/winevdm/winevdm.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c
index 263f561..5491384 100644
--- a/programs/winevdm/winevdm.c
+++ b/programs/winevdm/winevdm.c
@@ -409,11 +409,6 @@ int main( int argc, char *argv[] )
WINE_MESSAGE( "winevdm: unable to exec '%s': DOS support unavailable\n", appname );
ExitProcess(1);
}
- if (!VirtualQuery( NULL, &mem_info, sizeof(mem_info) ) || mem_info.State == MEM_FREE)
- {
- WINE_MESSAGE( "winevdm: unable to exec '%s': DOS memory range unavailable\n", appname );
- ExitProcess(1);
- }
if (*first_arg) first_arg++; /* skip program name */
cmdline = build_command_line( first_arg );
@@ -457,10 +452,18 @@ int main( int argc, char *argv[] )
/* first see if it is a .pif file */
if( ( p = strrchr( appname, '.' )) && !strcasecmp( p, ".pif"))
pif_cmd( appname, cmdline + 1);
- else
+ else
+ {
+ if (!VirtualQuery( NULL, &mem_info, sizeof(mem_info) ) || mem_info.State == MEM_FREE)
+ {
+ WINE_MESSAGE( "winevdm: unable to exec '%s': DOS memory range unavailable\n", appname );
+ ExitProcess(1);
+ }
+
/* try DOS format */
/* loader expects arguments to be regular C strings */
wine_load_dos_exe( appname, cmdline + 1 );
+ }
/* if we get back here it failed */
instance = GetLastError();
}
More information about the wine-cvs
mailing list