From: Zefram Date: Wed, 2 Jul 2014 14:03:27 +0000 (+0100) Subject: Permit non-integer sizes for item_image[] X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=07f444ed85dd900a75062e7dcf0cc0690063283b;p=zefram%2Fminetest%2Fminetest_engine.git Permit non-integer sizes for item_image[] --- diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 910a0a6b..d6a4b4f4 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -621,8 +621,8 @@ void GUIFormSpecMenu::parseItemImage(parserData* data,std::string element) pos.Y += stof(v_pos[1]) * (float) spacing.Y; v2s32 geom; - geom.X = stoi(v_geom[0]) * (float)imgsize.X; - geom.Y = stoi(v_geom[1]) * (float)imgsize.Y; + geom.X = stof(v_geom[0]) * (float)imgsize.X; + geom.Y = stof(v_geom[1]) * (float)imgsize.Y; if(data->bp_set != 2) errorstream<<"WARNING: invalid use of item_image without a size[] element"<