diff --git a/cgdoom/i_system.c b/cgdoom/i_system.c index e79a3c8..b747c00 100644 --- a/cgdoom/i_system.c +++ b/cgdoom/i_system.c @@ -69,9 +69,7 @@ byte* I_ZoneBase (int* size, int i) byte *I_ScreenBase(int screen) { - if (screen == 0) - return malloc(320 * 200); - if (screen == 1) + if (screen == 0 || screen == 1 || screen == 2 || screen == 3) return malloc(320 * 200); if (screen == 4) return malloc(320 * 32); diff --git a/cgdoom/p_setup.c b/cgdoom/p_setup.c index 0692473..37e7791 100644 --- a/cgdoom/p_setup.c +++ b/cgdoom/p_setup.c @@ -662,7 +662,7 @@ void P_GroupLines (void) } // build line tables for each sector - linebuffer = (line_t **)Z_Malloc (total*4, PU_LEVEL, 0); + linebuffer = (line_t **)Z_Malloc (total*sizeof(void *), PU_LEVEL, 0); sector = sectors; for (i=0 ; i