Sfoglia il codice sorgente

Small correction to continueWhile

n1073645 5 anni fa
parent
commit
3921b4f445
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      src/core/lib/Stream.mjs

+ 1 - 2
src/core/lib/Stream.mjs

@@ -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))
-        this.position--;
+        while ((++this.position < this.length) && (this.bytes[(this.position)] === val));
     }
     }
 
 
     /**
     /**