erich666 / GraphicsGems

Code for the "Graphics Gems" book series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find a bug in gemsiv/clahe.c

liandaoacc opened this issue · comments

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

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.

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.
gonsolo@5eff48b

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).