From 87e9753e1cbb0149b4d96fb3ac7a3f3cc1718364 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 24 Mar 2018 22:45:42 +0100 Subject: [PATCH] fix padstr --- src/game-lib-a-2-utils.js | 2 +- src/game-lib-image.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game-lib-a-2-utils.js b/src/game-lib-a-2-utils.js index a624fc1..d2b7698 100644 --- a/src/game-lib-a-2-utils.js +++ b/src/game-lib-a-2-utils.js @@ -983,7 +983,7 @@ GameLib.Utils.PaddedText = function(length, padChar, string) { var pad = ""; for (var x = 0; x < length; x++) { - pad[x] = padChar; + pad += padChar; } return pad.substring(0, pad.length - string.length) + string; diff --git a/src/game-lib-image.js b/src/game-lib-image.js index efda900..8890cf3 100644 --- a/src/game-lib-image.js +++ b/src/game-lib-image.js @@ -160,7 +160,7 @@ GameLib.Image.prototype.getPixelData = function() { var imageData = context.getImageData(0, 0, this.width, this.height); var pixels = imageData.data; - + return pixels; };