Fixed undefined key access in test program.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Thu, 21 May 2015 21:25:14 +0200
changeset 9609 897b25f560d0
parent 9608 17d2af576814
child 9610 27485b58df22
Fixed undefined key access in test program.
test/testdrawchessboard.c
--- a/test/testdrawchessboard.c	Wed May 20 16:28:21 2015 -0700
+++ b/test/testdrawchessboard.c	Thu May 21 21:25:14 2015 +0200
@@ -68,7 +68,7 @@
 			return;
 		}
 
-		if(e.key.keysym.sym == SDLK_ESCAPE) {
+		if ((e.type == SDL_KEYDOWN) && (e.key.keysym.sym == SDLK_ESCAPE)) {
 			done = 1;
 #ifdef __EMSCRIPTEN__
 			emscripten_cancel_main_loop();