From b1331433f7dd67ac9a260a6a520a6d6d2c8f3246 Mon Sep 17 00:00:00 2001 From: Danne Date: Fri, 19 May 2000 14:41:10 +0000 Subject: [PATCH] Added checks for possible height=0 crashes to GL target too. --- source/gl_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gl_screen.c b/source/gl_screen.c index 1964930..a6dd82d 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -305,7 +305,7 @@ float CalcFov (float fov_x, float width, float height) x = width/tan(fov_x/360*M_PI); - a = atan (height/x); + a = (x == 0) ? 90 : atan(height/x); // 0 shouldn't happen a = a*360/M_PI;