Fix out of bounds panic with polygon filling
This commit is contained in:
parent
fdcf254891
commit
1c803ff9c1
@ -215,7 +215,7 @@ type fillingContext struct {
|
||||
}
|
||||
|
||||
func (context *fillingContext) fillPolygonHotOpaque () {
|
||||
for index := 0; index < len(context.boundaries); index += 2 {
|
||||
for index := 0; index < len(context.boundaries) - 1; index += 2 {
|
||||
left := context.boundaries[index]
|
||||
right := context.boundaries[index + 1]
|
||||
|
||||
@ -240,7 +240,7 @@ func (context *fillingContext) fillPolygonHotOpaque () {
|
||||
}
|
||||
|
||||
func (context *fillingContext) fillPolygonHotTransparent () {
|
||||
for index := 0; index < len(context.boundaries); index += 2 {
|
||||
for index := 0; index < len(context.boundaries) - 1; index += 2 {
|
||||
left := context.boundaries[index]
|
||||
right := context.boundaries[index + 1]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user