Quellcode durchsuchen

Small correction to continueWhile

n1073645 vor 5 Jahren
Ursprung
Commit
3921b4f445
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
  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
      */
     consumeWhile(val) {
-        while ((this.position < this.length) && (this.bytes[(this.position++)] === val))
-        this.position--;
+        while ((++this.position < this.length) && (this.bytes[(this.position)] === val));
     }
 
     /**