summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-07 19:16:17 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-07 19:16:17 +0000
commit971f0c5963c7ebf0d495b3bb27ab9edb38777629 (patch)
tree3340d66d75ade5530f8b0d7fb2b9b36575348073
parentf83a2cd544835aa1138a043905d684563b7447db (diff)
downloadcrawl-ref-971f0c5963c7ebf0d495b3bb27ab9edb38777629.tar.gz
crawl-ref-971f0c5963c7ebf0d495b3bb27ab9edb38777629.zip
[1591152] Fixed macros being able to infinite loop; I'm hoping this will play well on curses without keypad(). It seems to work okay here, fingers crossed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@359 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/macro.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index b31c9e4364..4a182503b8 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -555,11 +555,11 @@ int getch_with_command_macros( void )
keyseq keys = getch_mul();
// ... and add them into the buffer (apply keymaps)
macro_buf_add_long( keys );
+
+ // Apply longest matching macro at front of buffer:
+ macro_buf_apply_command_macro();
}
- // Apply longest matching macro at front of buffer:
- macro_buf_apply_command_macro();
-
return (macro_buf_get());
}