From b24732728ce0038b7c549d31314a18dc1077d724 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 25 Oct 2025 11:40:12 +0200 Subject: [PATCH] =?UTF-8?q?Address=20potential=20UB=20reported=20by=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=82verity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/openmw/mwgui/windowbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/windowbase.cpp b/apps/openmw/mwgui/windowbase.cpp index a3acd81db8..c9328fdf62 100644 --- a/apps/openmw/mwgui/windowbase.cpp +++ b/apps/openmw/mwgui/windowbase.cpp @@ -26,7 +26,7 @@ size_t MWGui::wrap(size_t index, size_t max, int delta) return 0; return index + absDelta; } - unsigned absDelta = static_cast(-delta); + size_t absDelta = static_cast(-static_cast(delta)); if (index >= absDelta) return index - absDelta; else if (max == 0)