mengguang / minihdlc

Portable C library for HDLC Protocol
Apache License 2.0
46 stars 17 forks source link

Problem Using this Lib on AVR #4

Closed peimangordany closed 5 months ago

peimangordany commented 3 years ago

Hello, Thanks for the library, I had a problem using this library on AVR while everything was perfect on X64. I found that the problem was in Line 98 of "minihdlc.c". Instead of "if(mhst.frame_position - 2 >= 0)" there should be "if (mhst.frame_position>= 2)" because "frame_position" is a uint16 and this will result in a problem on some compilers.

mengguang commented 3 years ago

Good, I will check this later. Thanks.

mengguang commented 5 months ago

fixed.