From 971f0c5963c7ebf0d495b3bb27ab9edb38777629 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 7 Nov 2006 19:16:17 +0000 Subject: [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 --- crawl-ref/source/macro.cc | 6 +++--- 1 file 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()); } -- cgit v1.2.3-54-g00ecf