Index out of range exception after loading/printing gcode
- Issue MatterHackers/MCCentral#5152
This commit is contained in:
parent
fe52da9cdc
commit
6dda83eaa4
2 changed files with 7 additions and 3 deletions
|
|
@ -275,7 +275,7 @@ namespace MatterControl.Printing
|
|||
|
||||
public override double Ratio0to1IntoContainedLayer(int instructionIndex)
|
||||
{
|
||||
if (ByteCount != 0)
|
||||
if (ByteCount > 0)
|
||||
{
|
||||
return BytePosition / (double)ByteCount;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue