Mercurial > hg > dmlib
diff src/dmimage.c @ 963:1ffc48d0feaf
Initialize variables so that we don't get garbage in error situations.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Feb 2015 04:59:38 +0200 |
parents | 985225a93aeb |
children | c71fcf44b678 |
line wrap: on
line diff
--- a/src/dmimage.c Fri Feb 27 04:56:12 2015 +0200 +++ b/src/dmimage.c Fri Feb 27 04:59:38 2015 +0200 @@ -114,7 +114,7 @@ { Uint32 rmask, gmask, bmask, amask; SDL_Surface *result = NULL; - int width, height, comp; + int width = 0, height = 0, comp = 0; Uint8 *data; data = stbi_load_from_callbacks(&dmSTBICallbacks, file, &width, &height, &comp, 0);