From fb0167d5271ec2b6714f9056b477490501962e77 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 5 Apr 2008 23:01:00 +0000 Subject: [PATCH] console history cleanups git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1732 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/console.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/src/console.cpp b/source/src/console.cpp index 528ff6c9..a1a726f0 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -262,11 +262,11 @@ void keypress(int code, bool isdown, int cooked) break; case SDLK_UP: - if(histpos) s_strcpy(cmdline.buf, vhistory[--histpos]); + if(histpos>0) s_strcpy(cmdline.buf, vhistory[--histpos]); break; case SDLK_DOWN: - if(histpos