From d57cddb94b24c1972e5464c63b0529a44fd419aa Mon Sep 17 00:00:00 2001 From: Maik Fischer Date: Sun, 29 Oct 2017 19:01:04 +0100 Subject: [PATCH] itemz: fix int16_t -> uint8_t truncation --- src/itemz.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/itemz.c b/src/itemz.c index 574705a..7cf8ea6 100644 --- a/src/itemz.c +++ b/src/itemz.c @@ -74,10 +74,12 @@ static void _delete_item(BYTE num) { } static void delete_item(void) { - BYTE num, last; - + int16_t num; + uint8_t last; cprintf("\r Welcher Eintrag soll geloescht werden?\r\n"); - if ((num = cget_number(-1)) < 0) + + num = cget_number(-1); + if (num < 0) return; if (status.num_items > 1) { -- 2.39.5