changeset 1042:c71fcf44b678

Image resources may get decoded multiple times, so seek to node start.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 01 Mar 2015 17:31:48 +0200
parents d0f80f6a0c65
children 6ca9c334f5cd
files src/dmimage.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmimage.c	Sun Mar 01 17:17:52 2015 +0200
+++ b/src/dmimage.c	Sun Mar 01 17:31:48 2015 +0200
@@ -117,6 +117,7 @@
     int width = 0, height = 0, comp = 0;
     Uint8 *data;
 
+    dmfseek(file, 0, SEEK_SET);
     data = stbi_load_from_callbacks(&dmSTBICallbacks, file, &width, &height, &comp, 0);
 
     if (data == NULL)