소스 검색

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));
     }
 
     /**