From 126db2d6def3ae16f5b4cab8c57b3f0282cf3c02 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 5 May 2017 14:26:34 -0500 Subject: [PATCH] fix null assignments to std::strings the right way --- desmume/src/NDSSystem.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 3b8129d89..5966627e1 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -658,16 +658,8 @@ struct LastRom { int NDS_LoadROM(const char *filename, const char *physicalName, const char *logicalFilename) { lastRom.filename = filename; - - if (physicalName != NULL ) - { - lastRom.physicalName = physicalName; - } - - if (logicalFilename != NULL) - { - lastRom.logicalFilename = logicalFilename; - } + lastRom.physicalName = physicalName ? physicalName : ""; + lastRom.logicalFilename = logicalFilename ? logicalFilename : ""; int ret; char buf[MAX_PATH];