diff options
| author | Selene ToyKeeper | 2019-07-30 14:39:55 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2019-07-30 14:39:55 -0600 |
| commit | ba961635820f16e4726bf19bfb012aa7d7876c47 (patch) | |
| tree | c1fc567f728792e5239e813ec2120daa4d742339 | |
| parent | merged Mateminco MF01S / MT18 branch, adding support for the new light (diff) | |
| download | anduril-ba961635820f16e4726bf19bfb012aa7d7876c47.tar.gz anduril-ba961635820f16e4726bf19bfb012aa7d7876c47.tar.bz2 anduril-ba961635820f16e4726bf19bfb012aa7d7876c47.zip | |
ensure muggle thermal step-down can't overflow or wrap around
| -rw-r--r-- | spaghetti-monster/anduril/anduril.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index c2a4b77..24211d7 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -1846,7 +1846,7 @@ uint8_t muggle_state(Event event, uint16_t arg) { blip(); #endif // step down proportional to the amount of overheating - uint8_t new = actual_level - arg; + int16_t new = actual_level - arg; if (new < MUGGLE_FLOOR) { new = MUGGLE_FLOOR; } set_level(new); return MISCHIEF_MANAGED; |
