Skip to content

Commit c4f6eb7

Browse files
committed
Fix up references to self
Fixed #431
1 parent ddcdc96 commit c4f6eb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -980,14 +980,14 @@ export class DataStream {
980980

981981
readNulString(pos, maxLength) {
982982
if (!maxLength) maxLength = 1024;
983-
let posToUse = pos === undefined ? self.pos : pos;
983+
let posToUse = pos === undefined ? this.pos : pos;
984984
let result = "";
985985
let c;
986-
while ((c = self.readByte(posToUse++)) !== 0 && --maxLength) {
986+
while ((c = this.readByte(posToUse++)) !== 0 && --maxLength) {
987987
result += String.fromCharCode(c);
988988
}
989989
if (maxLength === 0) return "";
990-
if (pos === undefined) self.pos = posToUse;
990+
if (pos === undefined) this.pos = posToUse;
991991
return result;
992992
}
993993

0 commit comments

Comments
 (0)