From 2501f5aa3c251cf93bf849805eb368dc621feec1 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 30 Oct 2020 21:14:31 -0300 Subject: [PATCH] Fix tile button with negative base index --- src/app/ui/tile_button.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/ui/tile_button.cpp b/src/app/ui/tile_button.cpp index b4d2c3247..48a284e0f 100644 --- a/src/app/ui/tile_button.cpp +++ b/src/app/ui/tile_button.cpp @@ -149,7 +149,8 @@ void TileButton::onPaint(PaintEvent& ev) if (site.tileset()) baseIndex = site.tileset()->baseIndex(); - std::string str = fmt::format("{}", doc::tile_geti(m_tile) + baseIndex - 1); + std::string str = fmt::format( + "{}", int(doc::tile_geti(m_tile)) + baseIndex - 1); setTextQuiet(str.c_str()); // TODO calc a proper color for the text