Fixed invalid memory access in DGA video driver (thanks ldb!)
authorSam Lantinga <slouken@libsdl.org>
Wed, 11 Dec 2002 05:52:28 +0000
changeset 559 b528214c8c9a
parent 558 2312d983e1fe
child 560 37c31c12eb70
Fixed invalid memory access in DGA video driver (thanks ldb!)
src/video/dga/SDL_dgavideo.c
--- a/src/video/dga/SDL_dgavideo.c	Wed Dec 11 05:47:32 2002 +0000
+++ b/src/video/dga/SDL_dgavideo.c	Wed Dec 11 05:52:28 2002 +0000
@@ -474,7 +474,7 @@
 		SDL_SetError("Unable to switch to requested mode");
 		return(NULL);
 	}
-	DGA_visualClass = modes[i].visualClass;
+	DGA_visualClass = mode->mode.visualClass;
 	memory_base = (Uint8 *)mode->data;
 	memory_pitch = mode->mode.bytesPerScanline;