This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch swift-sdk
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 33ad4d8a97a6670953519b0a8a9bf6ad7c75a8b0
Author: Byron Ellis <byronel...@google.com>
AuthorDate: Thu Aug 17 11:51:53 2023 -0700

    Small change to try to stop crashing on Linux
---
 sdks/swift/Sources/ApacheBeam/Internal/Data+Decoding.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/swift/Sources/ApacheBeam/Internal/Data+Decoding.swift 
b/sdks/swift/Sources/ApacheBeam/Internal/Data+Decoding.swift
index aa6b31bf35b..d2c3637e9f8 100644
--- a/sdks/swift/Sources/ApacheBeam/Internal/Data+Decoding.swift
+++ b/sdks/swift/Sources/ApacheBeam/Internal/Data+Decoding.swift
@@ -47,7 +47,7 @@ extension Data {
                 }
             }
         }
-        self = self.advanced(by: advance)
+        self = advance == count ? Data() : self.advanced(by: advance)
         return result
     }
     

Reply via email to