From adeeef7ef724713111df38788df2fe4a29b60e7a Mon Sep 17 00:00:00 2001 From: leeway Date: Sat, 11 Feb 2023 22:06:27 +0800 Subject: [PATCH] feat: update version to 2.1.1 --- CocoaMQTT.podspec | 4 ++-- Source/CocoaMQTTReader.swift | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CocoaMQTT.podspec b/CocoaMQTT.podspec index e0124fa0..0d55c868 100644 --- a/CocoaMQTT.podspec +++ b/CocoaMQTT.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CocoaMQTT" - s.version = "2.1.0" + s.version = "2.1.1" s.summary = "MQTT v3.1.1 client library for iOS and OS X written with Swift 5" s.homepage = "https://github.com/emqx/CocoaMQTT" s.license = { :type => "MIT" } @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = "9.0" s.tvos.deployment_target = "10.0" # s.watchos.deployment_target = "2.0" - s.source = { :git => "https://github.com/emqx/CocoaMQTT.git", :tag => "2.1.0"} + s.source = { :git => "https://github.com/emqx/CocoaMQTT.git", :tag => "2.1.1"} s.default_subspec = 'Core' s.subspec 'Core' do |ss| diff --git a/Source/CocoaMQTTReader.swift b/Source/CocoaMQTTReader.swift index f5a00fca..239accd2 100644 --- a/Source/CocoaMQTTReader.swift +++ b/Source/CocoaMQTTReader.swift @@ -78,7 +78,11 @@ class CocoaMQTTReader { // more } else { let result = multiply.multipliedReportingOverflow(by: 128) - multiply = result.partialValue + if !result.overflow { + multiply = result.partialValue + }else{ + reset() + } readLength() } }