diff options
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 6b46af30f8b..8c579156691 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -155,12 +155,9 @@ void IMB_gamwarp(struct ImBuf *ibuf, double gamma) gamma)) + 0.5; rect = (uchar *) ibuf->rect; - for (i = ibuf->x * ibuf->y ; i>0 ; i--){ - rect ++; - /* put a warning in gcc : operation may be undefined : */ - /* it is true it's rather convoluted even by C standards ;) */ - *rect ++ = gam[*rect]; /*FIXME*/ - *rect ++ = gam[*rect]; /*FIXME*/ - *rect ++ = gam[*rect]; /*FIXME*/ + for (i = ibuf->x * ibuf->y ; i>0 ; i--, rect+=4){ + rect[0] = gam[rect[0]]; + rect[1] = gam[rect[1]]; + rect[2] = gam[rect[2]]; } } |