Seek back to start on error
authorSam Lantinga <slouken@libsdl.org>
Sat, 04 Feb 2006 22:01:44 +0000
changeset 1329 bc67bbf87818
parent 1328 27ddb06a0bca
child 1330 450721ad5436
Seek back to start on error
src/video/SDL_bmp.c
--- a/src/video/SDL_bmp.c	Sat Feb 04 16:29:22 2006 +0000
+++ b/src/video/SDL_bmp.c	Sat Feb 04 22:01:44 2006 +0000
@@ -318,6 +318,9 @@
 	}
 done:
 	if ( was_error ) {
+		if ( src ) {
+			SDL_RWseek(src, fp_offset, SEEK_SET);
+		}
 		if ( surface ) {
 			SDL_FreeSurface(surface);
 		}