misc: avoid saving some heap garbage
authornotaz <notasas@gmail.com>
Sat, 27 Dec 2025 00:51:56 +0000 (02:51 +0200)
committernotaz <notasas@gmail.com>
Sat, 27 Dec 2025 00:51:56 +0000 (02:51 +0200)
libpcsxcore/misc.c

index e0445e7..33a4272 100644 (file)
@@ -767,6 +767,7 @@ int SaveState(const char *file) {
        gpufP = (GPUFreeze_t *)malloc(sizeof(GPUFreeze_t));
        if (gpufP == NULL) goto cleanup;
        gpufP->ulFreezeVersion = 1;
+       memset(gpufP->ulControl, 0, sizeof(gpufP->ulControl));
        GPU_freeze(1, gpufP);
        SaveFuncs.write(f, gpufP, sizeof(GPUFreeze_t));
        free(gpufP); gpufP = NULL;