erich666 / GraphicsGems

Code for the "Graphics Gems" book series
Other
1.39k stars 265 forks source link

Find a bug in gemsiv/clahe.c #19

Closed liandaoacc closed 7 years ago

liandaoacc commented 7 years ago

In gemsiv/clahe.c, lin 226, pImage = &pImagePointer[uiSizeX]; should be pImage = &pImagePointer[-uiSizeX];. At the original version, it is pImage = &pImagePointer[-uiSizeX];.

erich666 commented 7 years ago

Thanks very much, and it's now fixed. The commit here introduced this problem a year ago, and it slipped by me in review among the endless casting changes. I've gone over the submission again and believe no other bugs were introduced.

gonsolo commented 7 years ago

There was a problem before my commit: Unary minus of an unsigned int gives an unsigned int which probably not what you want here. I have the correct fix in my repository. Please pull. https://github.com/gonsolo/GraphicsGems/commit/5eff48b8d9f66c3ec0d23e4690a746ca63798679

erich666 commented 7 years ago

Thanks, and fixed (no idea how to make a pull request from your branch; I thought you'd submit a PR for me to accept).