Merge pull request #265039 from trofi/zsnes-fortify3-amend

zsnes: amend fortify3 patch and fix initialization
This commit is contained in:
Peder Bergebakken Sundt 2023-11-02 20:28:28 +01:00 committed by GitHub
commit 942908f7f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,12 +18,3 @@ Detected by _FORTIFY_SOURCE=3:
extern unsigned char SPCRAM[65472];
unsigned char *SPCState = SPCRAM;
@@ -1456,7 +1456,7 @@ void clearmem()
memset(pal16b, 0, 1024);
memset(pal16bcl, 0, 1024);
memset(pal16bclha, 0, 1024);
- for (i=0 ; i<1024 ; i+=4)
+ for (i=0 ; i<1024-4 ; i+=4)
{
memset(pal16bxcl+i, 255, 2);
memset(pal16bxcl+i+2, 0, 2);