From 3fed0331cc7acd3a38ebd1d3eb01342ed04dbe46 Mon Sep 17 00:00:00 2001 From: harry Date: Tue, 2 Aug 2022 21:02:50 -0400 Subject: [PATCH] Fix for global variable SFCPU read overflow error when running with clang/gcc address sanitizer. The code that writes the save state to disk expects the parameter description to at least be 4 bytes. --- src/state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state.cpp b/src/state.cpp index a29a46d0..503622b1 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -110,7 +110,7 @@ SFORMAT SFCPU[]={ { &X.Y, 1, "Y\0\0"}, { &X.S, 1, "S\0\0"}, { &X.P, 1, "P\0\0"}, - { &X.DB, 1, "DB"}, + { &X.DB, 1, "DB\0"}, { &RAM, 0x800 | FCEUSTATE_INDIRECT, "RAM", }, { 0 } };