Skip to content

Commit

Permalink
BugFix ByteArrayInputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
bastie committed Sep 7, 2024
1 parent 7ae5de1 commit 1927382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/JavApi/io/ByteArrayInputStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ extension java.io {
}
let k = min (length, (self.count - pos))

for _ in 0..<k {
for i in 0..<k {
switch self.readUInt8() {
case .success(let value):
array[offset+k] = value
array[offset+i] = value
case .failure(let error):
throw error
}
Expand Down

0 comments on commit 1927382

Please sign in to comment.