From 8c6fa795fb4f4f7244f48c7082c96599e73f1dab Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 12 Jan 2008 12:05:00 +0000 Subject: [PATCH] history stuff git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1573 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/console.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/src/console.cpp b/source/src/console.cpp index 1350aec5..04cbd260 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -225,14 +225,14 @@ int histpos = 0; void history(int n) { - if(vhistory.inrange(n)) + static bool inhistory = true; + if(!inhistory && vhistory.inrange(n)) { + inhistory = true; char *buf = vhistory[vhistory.length()-n-1]; - if(buf[0]=='/') - { - if(strncmp(buf, "/history ", strlen("/history "))) execute(buf+1); // avoid history-recursion - } + if(buf[0]=='/') execute(buf+1); else toserver(buf); + inhistory = false; } }