summaryrefslogtreecommitdiff
path: root/swift/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-03-18 11:37:58 +0100
committerJose <jose@zeroc.com>2019-03-18 11:37:58 +0100
commit8912fa05c335c554c41faecccbcfaff7fa260770 (patch)
treee188b60db6843d71c3e6e31f5c03ca0c6a95e934 /swift/src
parentUse C++ Servers with Swift (diff)
downloadice-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.swift2
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