Fix zero division

This commit is contained in:
Miloslav Číž 2020-11-22 10:55:51 +01:00
parent 8fb8dba7a2
commit 6a2477f63c
2 changed files with 2 additions and 2 deletions

2
game.h
View File

@ -1235,7 +1235,7 @@ RCL_Unit SFG_movingWallHeight
uint32_t time uint32_t time
) )
{ {
RCL_Unit height = high - low; RCL_Unit height = RCL_nonZero(high - low);
RCL_Unit halfHeight = height / 2; RCL_Unit halfHeight = height / 2;
RCL_Unit sinArg = RCL_Unit sinArg =

View File

@ -32,7 +32,7 @@ static const char *SFG_menuItemTexts[] =
#define SFG_TEXT_KILLS "kills" #define SFG_TEXT_KILLS "kills"
#define SFG_TEXT_SAVE_PROMPT "save? L no yes R" #define SFG_TEXT_SAVE_PROMPT "save? L no yes R"
#define SFG_TEXT_SAVED "saved" #define SFG_TEXT_SAVED "saved"
#define SFG_VERSION_STRING "1.0" #define SFG_VERSION_STRING "1.0d"
/**< /**<
Version numbering is following: major.minor for stable releases, Version numbering is following: major.minor for stable releases,
in-development unstable versions have the version of the latest stable + in-development unstable versions have the version of the latest stable +