atc1441 / E-Paper_Pricetags

GNU General Public License v3.0
219 stars 38 forks source link

Fixed line position in entropy calculation #55

Closed kyberpunk closed 1 year ago

kyberpunk commented 1 year ago

Hi I was trying to port code to Linux and accidentally found found a bug in reading bitmap lines in entropy calculation function. Loop is iterating over bin_image_input->width here but the difference was made from bin_image_input->height which is in case of Chroma29 lower. This caused attempts to seek negative position number. Seek function was seamlessly failing and position was set to 0, in fact.