From c2d84d77ef8a6265dd4b2e513624ebada604f517 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Mon, 26 Nov 2012 23:02:37 +0000 Subject: [PATCH] Fixed an index error in FontTexture (issue #1308) --- core/src/processing/opengl/FontTexture.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/core/src/processing/opengl/FontTexture.java b/core/src/processing/opengl/FontTexture.java index df8115fc2..0445d611a 100644 --- a/core/src/processing/opengl/FontTexture.java +++ b/core/src/processing/opengl/FontTexture.java @@ -159,14 +159,14 @@ class FontTexture implements PConstants { currentTex = textures.length - 1; PImage[] tempImg = images; - images = new PImage[textures.length + 1]; + images = new PImage[textures.length]; PApplet.arrayCopy(tempImg, images, tempImg.length); images[tempImg.length] = pg.wrapTexture(tex); } lastTex = currentTex; // Make sure that the current texture is bound. - //tex.bind(); + tex.bind(); return resize; } @@ -324,14 +324,6 @@ class FontTexture implements PConstants { } } - if (lastTex == -1) { - lastTex = 0; - } - - if (currentTex != lastTex || resized) { - currentTex = idx; - } - TextureInfo tinfo = new TextureInfo(currentTex, offsetX, offsetY, w, h, rgba); offsetX += w;