fix: Undefined behaviour when setting task bar progress

This commit is contained in:
WerWolv
2025-08-28 00:01:49 +02:00
parent bd9e9a7dcf
commit 228385ceaa

View File

@@ -292,7 +292,8 @@ namespace hex::plugin::builtin {
const auto progress = frontTask->getMaxValue() == 0 ? -1 : float(frontTask->getValue()) / float(frontTask->getMaxValue());
ImHexApi::System::setTaskBarProgress(ImHexApi::System::TaskProgressState::Progress, ImHexApi::System::TaskProgressType::Normal, u32(progress * 100));
if (progress >= 0)
ImHexApi::System::setTaskBarProgress(ImHexApi::System::TaskProgressState::Progress, ImHexApi::System::TaskProgressType::Normal, u32(progress * 100));
const auto widgetStart = ImGui::GetCursorPos();
{