From 438fbca27d8192db83b67f8110c702c0525e7efe Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Sun, 20 Nov 2016 23:27:22 +0300 Subject: [PATCH] Fixed a problem with unnecessary skipping of bits (causing nlength and length problem). --- Sources/DataWithPointer.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/DataWithPointer.swift b/Sources/DataWithPointer.swift index 529bba6b..a259176c 100644 --- a/Sources/DataWithPointer.swift +++ b/Sources/DataWithPointer.swift @@ -88,6 +88,7 @@ class DataWithPointer { // MARK: Manipulations with index and bitShift func skipUntilNextByte() { + guard self.bitShift != 0 else { return } self.index += 1 self.bitShift = 0 }