Skip to content

Commit

Permalink
patched divide by zero within SmelteryGui
Browse files Browse the repository at this point in the history
  • Loading branch information
GraxRabble committed Sep 18, 2013
1 parent ff7b967 commit 9d4cc1c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/tconstruct/client/gui/SmelteryGui.java
Expand Up @@ -117,10 +117,13 @@ protected void drawGuiContainerForegroundLayer (int mouseX, int mouseY)
{
int total = logic.getTotalLiquid();
int liquidLayers = (total / 20000 + 1) * 20000;
liquidSize = liquid.amount * 52 / liquidLayers;
if (liquidSize == 0)
liquidSize = 1;
base += liquidSize;
if (liquidLayers > 0)
{
liquidSize = liquid.amount * 52 / liquidLayers;
if (liquidSize == 0)
liquidSize = 1;
base += liquidSize;
}
}

int leftX = cornerX + basePos;
Expand Down

0 comments on commit 9d4cc1c

Please sign in to comment.