Skip to content

Commit e937a50

Browse files
authored
Merge pull request #1277 from sifmelcara/fix-int-sign-conversion
Fix conversion of signed constants to unsigned
2 parents 81bce1a + 8d2e20c commit e937a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: okio/src/nativeMain/kotlin/okio/SizetVariant.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ internal fun variantFread(
2929
target: CPointer<ByteVarOf<Byte>>,
3030
byteCount: UInt,
3131
file: CPointer<FILE>,
32-
): UInt = fread(target, 1, byteCount.convert(), file).convert()
32+
): UInt = fread(target, 1u, byteCount.convert(), file).convert()
3333

3434
@OptIn(UnsafeNumber::class)
3535
internal fun variantFwrite(
3636
source: CPointer<ByteVar>,
3737
byteCount: UInt,
3838
file: CPointer<FILE>,
39-
): UInt = fwrite(source, 1, byteCount.convert(), file).convert()
39+
): UInt = fwrite(source, 1u, byteCount.convert(), file).convert()

0 commit comments

Comments
 (0)