Fix for loop for C99

> ui/helpers.c:78:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
This commit is contained in:
Viktor Szépe 2017-08-03 18:12:15 +02:00 committed by GitHub
parent 677a460ad2
commit bc43b1595f

View file

@ -75,7 +75,8 @@ char * hex_to_bitmap(char hex_digit) {
char *bitmap = malloc(5 * sizeof(char));
bitmap[4] = '\0';
for(int i = 3; i >= 0; i--) {
int i;
for(i = 3; i >= 0; i--) {
bitmap[i] = digit % 2 ? '1' : '0';
digit /= 2;
}