From 658cbc5e0093d45030a317030a80b6ca5ac9bdf5 Mon Sep 17 00:00:00 2001 From: Koen Date: Fri, 18 Jul 2025 08:34:22 +0000 Subject: [PATCH] Edit FCastCastingDevice.kt --- .../java/com/futo/platformplayer/casting/FCastCastingDevice.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/futo/platformplayer/casting/FCastCastingDevice.kt b/app/src/main/java/com/futo/platformplayer/casting/FCastCastingDevice.kt index dcfaf63d..be62f726 100644 --- a/app/src/main/java/com/futo/platformplayer/casting/FCastCastingDevice.kt +++ b/app/src/main/java/com/futo/platformplayer/casting/FCastCastingDevice.kt @@ -348,7 +348,7 @@ class FCastCastingDevice : CastingDevice { headerBytesRead += read } - val size = ((buffer[3].toLong() shl 24) or (buffer[2].toLong() shl 16) or (buffer[1].toLong() shl 8) or buffer[0].toLong()).toInt(); + val size = ((buffer[3].toUByte().toLong() shl 24) or (buffer[2].toUByte().toLong() shl 16) or (buffer[1].toUByte().toLong() shl 8) or buffer[0].toUByte().toLong()).toInt(); if (size > buffer.size) { Logger.w(TAG, "Packets larger than $size bytes are not supported.") break