zesinger / libserum

Cross platform dynamic library code for Serum file format
GNU General Public License v2.0
11 stars 4 forks source link

Identify_Frame function possible bug #57

Open JarekC-DIY opened 1 month ago

JarekC-DIY commented 1 month ago

serum_decode.cpp function Identify_Frame line 919 _if (firstmatch || ti != lastfound || mask < 255)

Condition is met for each frame with a mask. And what about the sequence: Ex. lastfound = ID5

Hashc == hashcodes[ti] Frame 1 ID = 99 , Crc=0XAA55AA55 frame with mask no. 7, full CRC = 0x12341234

So ti != lastfound Now last_found = ID99 lastframe_full_crc= 0x12341234 ti != lastfound function return ti

Frame 2. same as Frame 1 so ti == lastfound but mask< 255 function return ti and in this case the function should return IDENTIFY_SAME_FRAME

Am I interpreting this wrong?