Don't use memset() in CGDCalloc

I have no idea why it doesn't work, but it doesn't.
This commit is contained in:
Lephenixnoir 2021-07-17 10:48:38 +02:00
parent 670e3a4b50
commit 7db1f33862
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,9 @@ void * CGDCalloc(int iSize)
void *p = CGDMalloc(iSize);
if(p != NULL)
{
memset(p,0,iSize);
/* volatile here prevents GCC from calling memset(), which
doesn't seem to work for some obscure reason... */
for(int i = 0; i < iSize; i++) ((volatile char *)p)[i] = 0;
}
return p;
}
@ -609,7 +611,7 @@ void main(void){
default:
break;
}
D_DoomMain();
D_DoomMain();
}
//todo: wrapper pro (patch_t*), + flash