Small correction to continueWhile

This commit is contained in:
n1073645 2019-11-13 09:59:55 +00:00 committed by d98762625
parent 36bc88cc0c
commit a91b8d2b4c

View file

@ -213,8 +213,7 @@ export default class Stream {
* @param {Number} val * @param {Number} val
*/ */
consumeWhile(val) { consumeWhile(val) {
while ((this.position < this.length) && (this.bytes[(this.position++)] === val)) while ((++this.position < this.length) && (this.bytes[(this.position)] === val));
this.position--;
} }
/** /**