From 130e1421885df95d41ae4b6493ffc69f7f5d3b7e Mon Sep 17 00:00:00 2001 From: morbius13 <125813897+morbius13@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:33:35 +0200 Subject: [PATCH] Invalid narrowing conversion fix (short)(m_nScreenWidth - 1) should be used instead of (short)m_nScreenWidth - 1 --- ConsoleGameEngine/olcConsoleGameEngine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConsoleGameEngine/olcConsoleGameEngine.h b/ConsoleGameEngine/olcConsoleGameEngine.h index e525801..2954861 100644 --- a/ConsoleGameEngine/olcConsoleGameEngine.h +++ b/ConsoleGameEngine/olcConsoleGameEngine.h @@ -411,7 +411,7 @@ class olcConsoleGameEngine return Error(L"Screen Width / Font Width Too Big"); // Set Physical Console Window Size - m_rectWindow = { 0, 0, (short)m_nScreenWidth - 1, (short)m_nScreenHeight - 1 }; + m_rectWindow = { 0, 0, (short)(m_nScreenWidth - 1), (short)(m_nScreenHeight - 1)}; if (!SetConsoleWindowInfo(m_hConsole, TRUE, &m_rectWindow)) return Error(L"SetConsoleWindowInfo");