chiark / gitweb /
Fix a memory error in Guess cursor handling.
[sgt-puzzles.git] / pearl.c
diff --git a/pearl.c b/pearl.c
index 43afcd6cfb7aea415ac22e59d2bf074938ec5806..977577f55bb1d78bf9b05ad9e33b36fc1b77498b 100644 (file)
--- a/pearl.c
+++ b/pearl.c
@@ -2058,6 +2058,11 @@ static char *interpret_move(const game_state *state, game_ui *ui,
        }
     }
 
+    if (button == 27 || button == '\b') {
+        ui->ndragcoords = -1;
+        return "";
+    }
+
     if (release) {
         if (ui->ndragcoords > 0) {
             /* End of a drag: process the cached line data. */