-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
def split_55(b)
var ret = []
var s = size(b)
var i = s-1 # start from last
while i > 0
if b[i] == 0x55 && b[i+1] == 0xAA
ret.push(b[i..s-1]) # push last msg to list
b = b[(0..i-1)] # write the rest back to b
end
i -= 1
end
ret.push(b)
return ret
end
should be like this i think;
ret.push(b[(i+2)..s-1]) # push last msg to list
I think it needs that or the split message will still have the split chars in the messsage
Metadata
Metadata
Assignees
Labels
No labels