itead / ITEADLIB_Arduino_Nextion

MIT License
329 stars 319 forks source link

subtle recvRetNumber coding error #99

Open sunnybank101 opened 3 years ago

sunnybank101 commented 3 years ago

V.Subtle error.... recvRetNumber(uint32_t number, uint32_t timeout) function Line 67 number = ((uint32_t)temp[4] << 24) | ((uint32_t)temp[3] << 16) | (temp[2] << 8) | (temp[1]); should be *number = ((uint32_t)temp[4] << 24) | ((uint32_t)temp[3] << 16) | ((uint32_t)temp[2] << 8) | (temp[1]); <<8 on temp[2] can blow a uint8 as part of that calc