From 000a18e2cfa1744b513e19671de5e55f9ef4bcd9 Mon Sep 17 00:00:00 2001 From: faiface Date: Thu, 9 Mar 2017 22:56:46 +0100 Subject: [PATCH] fix GLTriangles.SetLen when decreasing length --- pixelgl/gltriangles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixelgl/gltriangles.go b/pixelgl/gltriangles.go index 2e4b8ae..6958e18 100644 --- a/pixelgl/gltriangles.go +++ b/pixelgl/gltriangles.go @@ -71,7 +71,7 @@ func (gt *GLTriangles) SetLen(len int) { } } if len < gt.Len() { - gt.data = gt.data[:len] + gt.data = gt.data[:len*gt.vs.Stride()] } }