فهرست منبع

Small correction to continueWhile

n1073645 5 سال پیش
والد
کامیت
3921b4f445
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  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));
     }
 
     /**