aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-06-23 15:38:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-06-23 15:38:30 -0700
commitcad53ce8a705d2318a5c5c6b5567c36e3427bb4d (patch)
treea36371ff7846b1cf65dea982f93e897a97490c2f /src
parentbc56607957556d4cd83da9cb096ba144a9e206f7 (diff)
fix bug with adding null terminator in readBinary
Diffstat (limited to 'src')
-rw-r--r--src/preamble.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js
index e7cbcce6..8cf87bfd 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -588,11 +588,10 @@ if (!this['read']) {
function readBinary(filename) {
var stringy = read(filename);
- var data = new Array(stringy.length+1);
+ var data = new Array(stringy.length);
for (var i = 0; i < stringy.length; i++) {
data[i] = stringy.charCodeAt(i) & 0xff;
}
- data[stringy.length] = 0;
return data;
}