changeset 559:b528214c8c9a

Fixed invalid memory access in DGA video driver (thanks ldb!)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 11 Dec 2002 05:52:28 +0000
parents 2312d983e1fe
children 37c31c12eb70
files src/video/dga/SDL_dgavideo.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;