From c21be27a7d7c0a6096e452db58cc10b8a71462aa Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Mon, 8 Aug 2022 17:27:38 +0100 Subject: [PATCH] Replace const char array indexing with equivalent code in pindefs.c --- src/pindefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pindefs.c b/src/pindefs.c index 1d860ebf..625d1f18 100644 --- a/src/pindefs.c +++ b/src/pindefs.c @@ -361,7 +361,7 @@ char *pins_to_strdup(const struct pindef_t * const pindef) { if(pindef->mask[index] & (1 << bit)) { if(*buf) *p++ = ',', *p++=' '; - p += sprintf(p, "~%d" + !(pindef->inverse[index] & (1 << bit)), pin); + p += sprintf(p, pindef->inverse[index] & (1 << bit)? "~%d": "%d", pin); } }