Replace const char array indexing with equivalent code in pindefs.c

This commit is contained in:
Stefan Rueger 2022-08-08 17:27:38 +01:00
parent 1da97f6825
commit c21be27a7d
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}