From ee3d635eb872a1b52f74ffa684ef2d40602bacb6 Mon Sep 17 00:00:00 2001 From: smatz Date: Fri, 24 Sep 2010 13:45:02 +0000 Subject: (svn r20840) -Fix: make write to NULL pointer volatile so it's not optimised away --- src/main_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main_gui.cpp') diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 1a4e876d1..b5ebe97dd 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -308,7 +308,7 @@ struct MainWindow : Window case GHK_REFRESH_SCREEN: MarkWholeScreenDirty(); break; case GHK_CRASH: // Crash the game - *(byte*)0 = 0; + *(volatile byte *)0 = 0; break; case GHK_MONEY: // Gimme money -- cgit v1.2.3-54-g00ecf