Skip to content

Commit

Permalink
Account for div by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Dec 15, 2024
1 parent 0ded791 commit 21107b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/r_skydefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static bool ParseSkyTex(cJSON *json, skytex_t *out)
out->scrollx = (fixed_t)(scrollx->valuedouble * (1.0 / TICRATE) * FRACUNIT);
out->scrolly = (fixed_t)(scrolly->valuedouble * (1.0 / TICRATE) * FRACUNIT);
out->scalex = (fixed_t)(scalex->valuedouble * FRACUNIT);
out->scaley = (fixed_t)(1.0 / scaley->valuedouble * FRACUNIT);
out->scaley = (scaley->valuedouble ? (fixed_t)(1.0 / scaley->valuedouble * FRACUNIT) : FRACUNIT);
return true;
}

Expand Down

0 comments on commit 21107b4

Please sign in to comment.