From 54d0f8124e1a934e04cb71f48e189af535c63fa2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 1 Jan 2012 16:35:10 +1100 Subject: TSAGE: Bugfix for #3467505 - crash viewing ammo belt when the clip is empty --- engines/tsage/blue_force/blueforce_dialogs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tsage') diff --git a/engines/tsage/blue_force/blueforce_dialogs.cpp b/engines/tsage/blue_force/blueforce_dialogs.cpp index a1ac19ecee..a76d5839a9 100644 --- a/engines/tsage/blue_force/blueforce_dialogs.cpp +++ b/engines/tsage/blue_force/blueforce_dialogs.cpp @@ -344,7 +344,7 @@ void AmmoBeltDialog::draw() { // Draw the first clip if necessary if (clip1) { - GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip1Bullets); + GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip1Bullets + 1); _clip1Rect.resize(clipSurface, _clip1Rect.left, _clip1Rect.top, 100); g_globals->gfxManager().copyFrom(clipSurface, bounds.left + _clip1Rect.left, bounds.top + _clip1Rect.top); @@ -352,7 +352,7 @@ void AmmoBeltDialog::draw() { // Draw the second clip if necessary if (clip2) { - GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip2Bullets); + GfxSurface clipSurface = surfaceFromRes(9, 6, BF_GLOBALS._clip2Bullets + 1); _clip2Rect.resize(clipSurface, _clip2Rect.left, _clip2Rect.top, 100); g_globals->gfxManager().copyFrom(clipSurface, bounds.left + _clip2Rect.left, bounds.top + _clip2Rect.top); -- cgit v1.2.3