diff --git a/src/misc/programs.cpp b/src/misc/programs.cpp index df65122c..dbcbabc4 100644 --- a/src/misc/programs.cpp +++ b/src/misc/programs.cpp @@ -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();