# HG changeset patch # User Matti Hamalainen # Date 1425005978 -7200 # Node ID 1ffc48d0feaf56aed9e7feb41eb708e15a4a85f6 # Parent b7c01d4ca98482b30c367ad3d0ccb0bb28d31321 Initialize variables so that we don't get garbage in error situations. diff -r b7c01d4ca984 -r 1ffc48d0feaf src/dmimage.c --- 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);