From cc9fa8a6f5d8d1ca82ee1cc7aa29e7c6ce23f590 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Mon, 19 Jun 2017 23:46:07 -0400 Subject: [PATCH] - fixed: Prevent /0 errors when calculating console scale, which could happen in certain rare situations. --- src/v_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v_draw.cpp b/src/v_draw.cpp index b60c17616f..2377e8f7d4 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -94,7 +94,7 @@ int GetUIScale(int altval) int vmax = screen->GetHeight() / 200; int hmax = screen->GetWidth() / 320; int max = MAX(vmax, hmax); - return MIN(scaleval, max); + return MAX(1,MIN(scaleval, max)); } // [RH] Stretch values to make a 320x200 image best fit the screen