]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client/hud.cpp
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / client / hud.cpp
index 8d8411ca1f34323614f365948e6652c04f4cdb79..e956c2738d012a341a28985b52737540f52f8a26 100644 (file)
@@ -1055,9 +1055,9 @@ void drawItemStack(
 
        if (def.type == ITEM_TOOL && item.wear != 0) {
                // Draw a progressbar
-               float barheight = rect.getHeight() / 16;
-               float barpad_x = rect.getWidth() / 16;
-               float barpad_y = rect.getHeight() / 16;
+               float barheight = static_cast<float>(rect.getHeight()) / 16;
+               float barpad_x = static_cast<float>(rect.getWidth()) / 16;
+               float barpad_y = static_cast<float>(rect.getHeight()) / 16;
 
                core::rect<s32> progressrect(
                        rect.UpperLeftCorner.X + barpad_x,