aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-08-28 02:13:35 -0600
committerSelene ToyKeeper2017-08-28 02:13:35 -0600
commit4a96d3e40ee667fa819c8c95b5e360245a12865a (patch)
treeebfec2ae0d8edc4510829572b2b152301c09abae /spaghetti-monster
parentAdded thermal config mode... but I'm not sure if it's the right UI for this ... (diff)
downloadanduril-4a96d3e40ee667fa819c8c95b5e360245a12865a.tar.gz
anduril-4a96d3e40ee667fa819c8c95b5e360245a12865a.tar.bz2
anduril-4a96d3e40ee667fa819c8c95b5e360245a12865a.zip
Fixed a crash when user presses the button more times than the UI supports.
(need to leave room for a trailing 0 in the array, oops)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/fsm-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-events.c b/spaghetti-monster/fsm-events.c
index 90d0ffa..99a6a72 100644
--- a/spaghetti-monster/fsm-events.c
+++ b/spaghetti-monster/fsm-events.c
@@ -47,7 +47,7 @@ uint8_t push_event(uint8_t ev_type) {
uint8_t prev_event = 0; // never push the same event twice in a row
for(i=0; current_event[i] && (i<EV_MAX_LEN); i++)
prev_event = current_event[i];
- if ((i < EV_MAX_LEN) && (prev_event != ev_type)) {
+ if ((i < EV_MAX_LEN-1) && (prev_event != ev_type)) {
current_event[i] = ev_type;
return 1; // event pushed
} else {
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.