- 0 is a valid level number.

Fixes #206.
This commit is contained in:
Christoph Oelckers 2020-08-18 20:12:04 +02:00
parent aa5f42e5f4
commit b417ad2f6d

View file

@ -99,12 +99,12 @@ constexpr inline int levelnum(int vol, int map)
constexpr inline int volfromlevelnum(int num)
{
return num > 0 ? num / 1000 : 0;
return num >= 0 ? num / 1000 : 0;
}
constexpr inline int mapfromlevelnum(int num)
{
return num > 0 ? num % 1000 : -1;
return num >= 0 ? num % 1000 : -1;
}