File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1663,7 +1663,7 @@ static int loadkvx (const char *filnam)
16631663 { kread (fil ,c ,3 ); pal [i ] = B_LITTLE32 ((((int )c [0 ])<<18 )+ (((int )c [1 ])<<10 )+ (((int )c [2 ])<<2 )+ (i <<24 )); }
16641664
16651665 yzsiz = ysiz * zsiz ; i = ((xsiz * yzsiz + 31 )>>3 );
1666- vbit = (int * )malloc (i ); if (!vbit ) { free (xyoffs ); kclose (fil ); return (-1 ); }
1666+ vbit = (int * )malloc (i + 1 ); if (!vbit ) { free (xyoffs ); kclose (fil ); return (-1 ); }
16671667 memset (vbit ,0 ,i );
16681668
16691669 for (vcolhashsizm1 = 4096 ;vcolhashsizm1 < (mip1leng >>1 );vcolhashsizm1 <<=1 ) ;
Original file line number Diff line number Diff line change @@ -415,7 +415,6 @@ int initinput(void)
415415 }
416416 if (dbuf ) {
417417 flen = kread (fh , dbuf , flen );
418- dbuf [flen + 1 ] = 0 ;
419418 kclose (fh );
420419 if (flen >= 0 ) {
421420 rwops = SDL_RWFromConstMem (dbuf , flen );
You can’t perform that action at this time.
0 commit comments