Skip to content

Commit

Permalink
Merge pull request #1277 from sifmelcara/fix-int-sign-conversion
Browse files Browse the repository at this point in the history
Fix conversion of signed constants to unsigned
  • Loading branch information
JakeWharton committed Jun 24, 2023
2 parents 81bce1a + 8d2e20c commit e937a50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions okio/src/nativeMain/kotlin/okio/SizetVariant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ internal fun variantFread(
target: CPointer<ByteVarOf<Byte>>,
byteCount: UInt,
file: CPointer<FILE>,
): UInt = fread(target, 1, byteCount.convert(), file).convert()
): UInt = fread(target, 1u, byteCount.convert(), file).convert()

@OptIn(UnsafeNumber::class)
internal fun variantFwrite(
source: CPointer<ByteVar>,
byteCount: UInt,
file: CPointer<FILE>,
): UInt = fwrite(source, 1, byteCount.convert(), file).convert()
): UInt = fwrite(source, 1u, byteCount.convert(), file).convert()

0 comments on commit e937a50

Please sign in to comment.