Skip to content

Commit

Permalink
Permit non-integer sizes for item_image[]
Browse files Browse the repository at this point in the history
  • Loading branch information
Zefram authored and sapier committed Jul 16, 2014
1 parent aebbcbf commit 07f444e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/guiFormSpecMenu.cpp
Expand Up @@ -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"<<std::endl;
Expand Down

0 comments on commit 07f444e

Please sign in to comment.