aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-07-30 14:39:55 -0600
committerSelene ToyKeeper2019-07-30 14:39:55 -0600
commitba961635820f16e4726bf19bfb012aa7d7876c47 (patch)
treec1fc567f728792e5239e813ec2120daa4d742339 /spaghetti-monster
parentmerged Mateminco MF01S / MT18 branch, adding support for the new light (diff)
downloadanduril-ba961635820f16e4726bf19bfb012aa7d7876c47.tar.gz
anduril-ba961635820f16e4726bf19bfb012aa7d7876c47.tar.bz2
anduril-ba961635820f16e4726bf19bfb012aa7d7876c47.zip
ensure muggle thermal step-down can't overflow or wrap around
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c2
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;
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.