valgrind FTW!
authorSam Lantinga <slouken@libsdl.org>
Mon, 24 Oct 2011 23:00:09 -0400
changeset 6028869b6723e1fc
parent 6027 56185b574d61
child 6029 4a8bbaa52b9b
valgrind FTW!
src/video/cocoa/SDL_cocoavideo.m
     1.1 --- a/src/video/cocoa/SDL_cocoavideo.m	Mon Oct 24 15:33:58 2011 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoavideo.m	Mon Oct 24 23:00:09 2011 -0400
     1.3 @@ -193,7 +193,7 @@
     1.4      SDL_FreeSurface(converted);
     1.5  
     1.6      /* Premultiply the alpha channel */
     1.7 -    for (i = (converted->h * converted->w); i--; ) {
     1.8 +    for (i = (surface->h * surface->w); i--; ) {
     1.9          Uint8 alpha = pixels[3];
    1.10          pixels[0] = (Uint8)(((Uint16)pixels[0] * alpha) / 255);
    1.11          pixels[1] = (Uint8)(((Uint16)pixels[1] * alpha) / 255);