Fix undefined behavior in Polymost

git-svn-id: https://svn.eduke32.com/eduke32@4907 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-01-12 01:54:33 +00:00
parent 0b1433b07c
commit 41a62ba96b

View file

@ -610,8 +610,8 @@ static float get_projhack_ratio(void)
else if (glprojectionhacks == 2) else if (glprojectionhacks == 2)
{ {
float const abs_shang = Bfabsf(gshang); float const abs_shang = Bfabsf(gshang);
if (abs_shang > 0.7f) rv = (abs_shang > 0.7f) ?
rv = 1.05f + 4.f * (abs_shang - 0.7f); 1.05f + 4.f * (abs_shang - 0.7f) : 1.f;
} }
else else
rv = 1.f; rv = 1.f;