diff options
author | Jose <jose@zeroc.com> | 2019-03-18 11:37:58 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-03-18 11:37:58 +0100 |
commit | 8912fa05c335c554c41faecccbcfaff7fa260770 (patch) | |
tree | e188b60db6843d71c3e6e31f5c03ca0c6a95e934 /swift/src | |
parent | Use C++ Servers with Swift (diff) | |
download | ice-8912fa05c335c554c41faecccbcfaff7fa260770.tar.bz2 ice-8912fa05c335c554c41faecccbcfaff7fa260770.tar.xz ice-8912fa05c335c554c41faecccbcfaff7fa260770.zip |
Fix Buffer.skip to allow skip 0
Diffstat (limited to 'swift/src')
-rw-r--r-- | swift/src/Ice/Buffer.swift | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swift/src/Ice/Buffer.swift b/swift/src/Ice/Buffer.swift index 02f6d9a11b0..931692ac4b5 100644 --- a/swift/src/Ice/Buffer.swift +++ b/swift/src/Ice/Buffer.swift @@ -53,7 +53,7 @@ internal final class Buffer { // Skip is allowed to jump to the "end" of the buffer (c + position == capacity) // No more bytes can be read after this // - guard count > 0, c + _position <= capacity else { + guard count >= 0, c + _position <= capacity else { throw UnmarshalOutOfBoundsException(reason: "attempting to set position outside buffer") } _position += c |