Mercurial > hg > dmlib
changeset 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 | b7c01d4ca984 |
children | 76ac0d5c89b3 |
files | src/dmimage.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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);