Index out of range exception after loading/printing gcode

- Issue MatterHackers/MCCentral#5152
This commit is contained in:
jlewin 2019-03-14 11:45:49 -07:00
parent fe52da9cdc
commit 6dda83eaa4
2 changed files with 7 additions and 3 deletions

View file

@ -275,7 +275,7 @@ namespace MatterControl.Printing
public override double Ratio0to1IntoContainedLayer(int instructionIndex)
{
if (ByteCount != 0)
if (ByteCount > 0)
{
return BytePosition / (double)ByteCount;
}