histpos bug fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1733 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-04-06 02:13:07 +00:00
parent fb0167d527
commit ab448f8767
+1 -2
View File
@@ -284,8 +284,6 @@ void keypress(int code, bool isdown, int cooked)
{
if(code==SDLK_RETURN)
{
histpos = vhistory.length();
string buf; // use a copy to safely close the commandline
s_strcpy(buf, cmdline.buf);
saycommand(NULL);
@@ -298,6 +296,7 @@ void keypress(int code, bool isdown, int cooked)
if(vhistory.empty() || strcmp(vhistory.last(), buf))
vhistory.add(newstring(buf)); // cap this?
}
histpos = vhistory.length();
}
else if(code==SDLK_ESCAPE)
{