dont find 0xff

This commit is contained in:
2026-04-22 20:14:06 +02:00
parent d45d4ecf1a
commit a9d016422e
2 changed files with 1 additions and 8 deletions
+1 -7
View File
@@ -236,13 +236,7 @@ end
---@param packet string
function uecp.parse_uecp(packet)
local end_i = string.find(packet, "\xff", 1, true)
if not end_i then
print("could not find 0xff")
return
end
local unstuffed = undo_byte_stuff(string.sub(packet, 2, end_i - 1))
local unstuffed = undo_byte_stuff(string.sub(packet, 2, #packet - 1))
local addr1 = string.byte(unstuffed, 1)
local addr2 = string.byte(unstuffed, 2)