1
0
Fork 0

fix limit check

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4210
This commit is contained in:
Peter Veenstra 2019-04-20 11:49:59 +00:00
parent 6b0f8d6833
commit 8a156f17d8

View file

@ -78,7 +78,7 @@ static Bitu PROGRAMS_Handler(void) {
HostPt writer=(HostPt)&index;
for (;size>0;size--) *writer++=mem_readb(reader++);
Program * new_program;
if (index > internal_progs.size()) E_Exit("something is messing with the memory");
if (index >= internal_progs.size()) E_Exit("something is messing with the memory");
PROGRAMS_Main * handler = internal_progs[index];
(*handler)(&new_program);
new_program->Run();