Draw Grid Mode: fixed a crash that happened when having locking slices to grid enabled

This commit is contained in:
biwa 2020-06-13 00:30:58 +02:00 committed by spherallic
parent 913c857d4c
commit 51fa48a160

View file

@ -363,12 +363,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
case GridLockMode.VERTICAL:
slicesH = horizontalslices;
slicesV = height / General.Map.Grid.GridSize;
slicesV = Math.Abs(height / General.Map.Grid.GridSize);
break;
case GridLockMode.BOTH:
slicesH = width / General.Map.Grid.GridSize;
slicesV = height / General.Map.Grid.GridSize;
slicesH = Math.Abs(width / General.Map.Grid.GridSize);
slicesV = Math.Abs(height / General.Map.Grid.GridSize);
break;
}