From 6a97f4d0c517d1d1c71fa599b97eb3508710f5a1 Mon Sep 17 00:00:00 2001 From: Utkarsh Verma Date: Sat, 3 Sep 2022 09:15:45 +0200 Subject: [PATCH] Support upto 256 click events on a block. Fixes #32 --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 8eb535f..4ed7e00 100644 --- a/main.c +++ b/main.c @@ -201,7 +201,8 @@ void signalHandler() { for (int j = 0; j < LEN(blocks); j++) { if (blocks[j].signal == signal - SIGRTMIN) { - char button[] = {'0' + info.ssi_int & 0xff, 0}; + char button[4]; // value can't be more than 255; + sprintf(button, "%d", info.ssi_int & 0xff); execBlock(j, button); break; }