comparison src/video/dga/SDL_dgavideo.c @ 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 4bcfb93e0dfe
children b8d311d90021
comparison
equal deleted inserted replaced
558:2312d983e1fe 559:b528214c8c9a
472 XFree(modes); 472 XFree(modes);
473 if ( mode == NULL ) { 473 if ( mode == NULL ) {
474 SDL_SetError("Unable to switch to requested mode"); 474 SDL_SetError("Unable to switch to requested mode");
475 return(NULL); 475 return(NULL);
476 } 476 }
477 DGA_visualClass = modes[i].visualClass; 477 DGA_visualClass = mode->mode.visualClass;
478 memory_base = (Uint8 *)mode->data; 478 memory_base = (Uint8 *)mode->data;
479 memory_pitch = mode->mode.bytesPerScanline; 479 memory_pitch = mode->mode.bytesPerScanline;
480 480
481 /* Set up the new mode framebuffer */ 481 /* Set up the new mode framebuffer */
482 current->flags = (SDL_FULLSCREEN|SDL_HWSURFACE); 482 current->flags = (SDL_FULLSCREEN|SDL_HWSURFACE);