NE_MODULE.stack_size was set to a ridiculously small value of 5.

Windows sets 0x1400 in such cases for programs.
This commit is contained in:
Andreas Mohr 1998-12-07 12:52:23 +00:00 committed by Alexandre Julliard
parent 1fea6b9623
commit 26952d7f60
1 changed files with 4 additions and 0 deletions

View File

@ -480,6 +480,10 @@ static HMODULE16 NE_LoadExeHeader( HFILE16 hFile, OFSTRUCT *ofs )
pModule = (NE_MODULE *)GlobalLock16( hModule );
memcpy( pModule, &ne_header, sizeof(ne_header) );
pModule->count = 0;
/* check *programs* for default minimal stack size */
if ( (!(pModule->flags & NE_FFLAGS_LIBMODULE))
&& (pModule->stack_size < 0x1400) )
pModule->stack_size = 0x1400;
pModule->module32 = 0;
pModule->self = hModule;
pModule->self_loading_sel = 0;