summaryrefslogtreecommitdiff
path: root/test/testdrawchessboard.c
diff options
context:
space:
mode:
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>2015-05-21 21:25:14 +0200
committerPhilipp Wiesemann <philipp.wiesemann@arcor.de>2015-05-21 21:25:14 +0200
commitdbd2fc4f335cc0bf7a069c956675b6e99322a734 (patch)
tree3124b089a91b0ad20dc8a5edb15cc8774d713891 /test/testdrawchessboard.c
parent68e32dd44fb710a221dd2019c4bd2656acb76599 (diff)
Fixed undefined key access in test program.
Diffstat (limited to 'test/testdrawchessboard.c')
-rw-r--r--test/testdrawchessboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
index ef89c2de7e..a0bb56b900 100644
--- a/test/testdrawchessboard.c
+++ b/test/testdrawchessboard.c
@@ -68,7 +68,7 @@ loop()
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();