this is why operator new is better than malloc

(we can't use new here; we're passing this structure to SDL)
This commit is contained in:
Glenn Maynard
2003-01-27 01:56:21 +00:00
parent 453543d599
commit 61c8b2fcd5
+1 -1
View File
@@ -104,7 +104,7 @@ void ApplyGraphicOptions()
void ExitGame()
{
SDL_Event *event;
event = (SDL_Event *) malloc(sizeof(event));
event = (SDL_Event *) malloc(sizeof(SDL_Event));
event->type = SDL_QUIT;
SDL_PushEvent(event);
}