Skip to content

Commit

Permalink
Fix build warning from gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Jan 23, 2020
1 parent fa0d9ae commit b663151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void Map::block(uint8_t x, uint8_t y, Block *b) {

Block *Map::block_under(Event *e) {
if (!e) { return NULL; }
uint16_t bx = e->event_x() / 2, by = e->event_y() / 2;
int16_t bx = e->event_x() / 2, by = e->event_y() / 2;
return bx >= 0 && by >= 0 && bx < _width && by < _height ? block((uint8_t)bx, (uint8_t)by) : NULL;
}

Expand Down

0 comments on commit b663151

Please sign in to comment.