Permalink
Browse files

range check fix

  • Loading branch information...
joncampbell123 committed Apr 6, 2018
1 parent 6f1b749 commit e864b3572061c655392fc5931777eadb4374ba22
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/dos/dos_execute.cpp
View
@@ -474,8 +474,8 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) {
*
* At some point I need to boot MS-DOS/PC-DOS 1.x and 2.x in small
* amounts of RAM to verify that's what actually happens. --J.C. */
if (stack_sp >= (memsize*0x10))
stack_sp = (memsize*0x10)-2;
if (stack_sp > ((memsize*0x10UL)-2))
stack_sp = (memsize*0x10UL)-2;
csip=RealMake(pspseg,0x100);
sssp=RealMake(pspseg,stack_sp);

0 comments on commit e864b35

Please sign in to comment.