Skip to content

Commit af43b56

Browse files
authored
Fix handling of manufacturer code (#895)
1 parent 69752a0 commit af43b56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kable-core/src/appleMain/kotlin/CBPeripheralCoreBluetoothAdvertisement.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ internal fun NSData.toManufacturerData(): ManufacturerData? = toByteArray().toMa
9292
private fun ByteArray.toManufacturerData(): ManufacturerData? =
9393
takeIf { size >= 2 }?.getShortAt(0)?.let { code ->
9494
ManufacturerData(
95-
code.toInt(),
95+
code.toInt() and 0xFF_FF,
9696
if (size > 2) slice(2 until size).toByteArray() else byteArrayOf(),
9797
)
9898
}

0 commit comments

Comments
 (0)