@@ -106,8 +106,9 @@ void Tile_State::draw(int x, int y, bool active, bool selected) {
106106 }
107107 }
108108 if (!gfx) {
109- char hi = (char )((id & 0xF0 ) >> 4 ), lo = (char )(id & 0x0F );
110- const char buffer[3 ] = {hi > 9 ? ' A' + hi - 10 : ' 0' + hi, lo > 9 ? ' A' + lo - 10 : ' 0' + lo, ' \0 ' };
109+ uint8_t hi = (id & 0xF0 ) >> 4 , lo = id & 0x0F ;
110+ char l1 = (char )(hi > 9 ? ' A' + hi - 10 : ' 0' + hi), l2 = (char )(lo > 9 ? ' A' + lo - 10 : ' 0' + lo);
111+ const char buffer[3 ] = {l1, l2, ' \0 ' };
111112 bool r = Config::rainbow_tiles ();
112113 Fl_Color bg = bg_colors[r ? lo : 0 ];
113114 if (!active) { bg = fl_inactive (bg); }
@@ -120,7 +121,7 @@ void Tile_State::draw(int x, int y, bool active, bool selected) {
120121 }
121122 if (Config::attributes () && color > -1 ) {
122123 sgb_color_images[color].draw (x, y, TILE_SIZE_2X, TILE_SIZE_2X);
123- const char buffer[2 ] = {' 0' + ( char ) color, ' \0 ' };
124+ const char buffer[2 ] = {( char )( ' 0' + color) , ' \0 ' };
124125 fl_font (FL_COURIER_BOLD, s);
125126 draw_outlined_text (buffer, x, y, TILE_SIZE_2X, TILE_SIZE_2X, FL_ALIGN_CENTER, sgb_colors[color]);
126127 }
0 commit comments