From 63343b6241de45a6db433d33aa2788ac78eb6aea Mon Sep 17 00:00:00 2001 From: Jake Westrip Date: Sat, 5 Aug 2017 06:15:15 +1000 Subject: [PATCH] Ensure jail does not decrease a skill past zero --- apps/openmw/mwgui/jailscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/jailscreen.cpp b/apps/openmw/mwgui/jailscreen.cpp index 211e0c5f9..8ac133d76 100644 --- a/apps/openmw/mwgui/jailscreen.cpp +++ b/apps/openmw/mwgui/jailscreen.cpp @@ -93,7 +93,7 @@ namespace MWGui if (skill == ESM::Skill::Security || skill == ESM::Skill::Sneak) value.setBase(std::min(100, value.getBase()+1)); else - value.setBase(value.getBase()-1); + value.setBase(std::max(0, value.getBase()-1)); } const MWWorld::Store& gmst = MWBase::Environment::get().getWorld()->getStore().get();