bang-olufsen / yahdlc

yahdlc - Yet Another HDLC implementation
MIT License
83 stars 27 forks source link

fixed wrong frame size in case frame size equals source buffer size #14

Open peterbone-bo opened 8 months ago

peterbone-bo commented 8 months ago

If we have a frame with a size that equals the src_len (source buffer size), then the returned frame size from yahdlc_get_data_with_state ends up being one less than the frame size.

Therefore, add 1 to return the correct frame size.