Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/fceux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorharry <hrosen2016@gmail.com>2022-08-20 05:33:09 +0300
committerharry <hrosen2016@gmail.com>2022-08-20 05:33:09 +0300
commitf3b33a628ff436f54028c7a905cb25893649ae99 (patch)
treea01305c42212b340afb47a4314a8f8bff80c9f10
parentf4ea3363492f71505f627bd133202ea8d51ffc1c (diff)
Minor fixes for warnings found by gcc undefined behavior sanitizer.
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/drivers/Qt/ppuViewer.cpp2
-rw-r--r--src/movie.cpp1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dad47fd2..8ef081d4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -87,6 +87,7 @@ else(WIN32)
if ( ${ASAN_ENABLE} )
add_definitions( -fsanitize=address -fsanitize=bounds-strict )
+ add_definitions( -fsanitize=undefined -fno-sanitize=vptr )
set( ASAN_LDFLAGS -lasan -lubsan)
message( STATUS "Address Sanitizer Enabled" )
else()
diff --git a/src/drivers/Qt/ppuViewer.cpp b/src/drivers/Qt/ppuViewer.cpp
index 101e26de..d151da42 100644
--- a/src/drivers/Qt/ppuViewer.cpp
+++ b/src/drivers/Qt/ppuViewer.cpp
@@ -1133,7 +1133,7 @@ void ppuPatternView_t::paintEvent(QPaintEvent *event)
xx = 0; yy = 0;
- showSelector = (cycleCount < 20);
+ showSelector = (cycleCount < 20) && (selTile.x() >= 0) && (selTile.y() >= 0);
if ( mode == 1 )
{
diff --git a/src/movie.cpp b/src/movie.cpp
index 6e6140cd..9bc3eb99 100644
--- a/src/movie.cpp
+++ b/src/movie.cpp
@@ -409,6 +409,7 @@ MovieData::MovieData()
, rerecordCount(0)
, binaryFlag(false)
, loadFrameCount(-1)
+ , fourscore(false)
, microphone(false)
, RAMInitOption(0)
, RAMInitSeed(0)