From 2fbae5bf5251aa4629b5782b7862d3553c420980 Mon Sep 17 00:00:00 2001 From: superp00t Date: Thu, 24 Aug 2023 21:25:02 -0400 Subject: [PATCH] fix(util): correct string empty checks --- src/util/SFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/SFile.cpp b/src/util/SFile.cpp index 2ccc464..7ea543c 100644 --- a/src/util/SFile.cpp +++ b/src/util/SFile.cpp @@ -132,7 +132,7 @@ int32_t SFile::Unload(void* ptr) { int32_t SFile::SetBasePath(const char* path) { SStrCopy(s_basepath, path, STORM_MAX_PATH); - if (s_basepath != '\0') { + if (*s_basepath != '\0') { auto len = SStrLen(s_basepath); if (s_basepath[len-1] != '\\') { SStrPack(s_basepath, "\\", STORM_MAX_PATH); @@ -149,7 +149,7 @@ int32_t SFile::SetBasePath(const char* path) { int32_t SFile::SetDataPath(const char* path) { SStrCopy(s_datapath, path, STORM_MAX_PATH); - if (s_datapath != '\0') { + if (*s_datapath != '\0') { auto len = SStrLen(s_datapath); if (s_basepath[len-1] != '\\') { SStrPack(s_datapath, "\\", STORM_MAX_PATH);