summaryrefslogtreecommitdiff
path: root/swift/src
diff options
context:
space:
mode:
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