From d42eb113edcf9800a6c916f11dab3abf51dbc3fa Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 3 Aug 2007 18:22:45 +0000 Subject: [PATCH] Fix bug 1766436 tab key crashes dosbox. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2945 --- src/shell/shell_misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index cb2c7fb3..e0c371eb 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_misc.cpp,v 1.49 2007-02-03 14:04:23 qbix79 Exp $ */ +/* $Id: shell_misc.cpp,v 1.50 2007-08-03 18:22:45 qbix79 Exp $ */ #include #include @@ -223,7 +223,7 @@ void DOS_Shell::InputCommand(char * line) { if (p_completion_start) { p_completion_start ++; - completion_index = str_index - strlen(p_completion_start); + completion_index = str_len - strlen(p_completion_start); } else { p_completion_start = line; completion_index = 0;