From 30d977ae5742bf35557f808f6e8332c0c235ee9d Mon Sep 17 00:00:00 2001 From: Almamu Date: Fri, 9 May 2025 03:33:35 +0200 Subject: [PATCH] fix: strchr wasn't properly done for window geometry --- src/WallpaperEngine/Application/CApplicationContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WallpaperEngine/Application/CApplicationContext.cpp b/src/WallpaperEngine/Application/CApplicationContext.cpp index f513381..b46ff2a 100644 --- a/src/WallpaperEngine/Application/CApplicationContext.cpp +++ b/src/WallpaperEngine/Application/CApplicationContext.cpp @@ -48,8 +48,8 @@ CApplicationContext::CApplicationContext (int argc, char* argv []) : const char* str = value.c_str (); const char* delim1 = strchr (str, 'x'); - const char* delim2 = delim1 ? strchr (delim1, 'x') : nullptr; - const char* delim3 = delim2 ? strchr (delim2, 'x') : nullptr; + const char* delim2 = delim1 ? strchr (delim1 + 1, 'x') : nullptr; + const char* delim3 = delim2 ? strchr (delim2 + 1, 'x') : nullptr; if (delim1 == nullptr || delim2 == nullptr || delim3 == nullptr) { sLog.exception ("Window geometry must be in the format: XxYxWxH");