Bug 4800 - cl_keys.c misc bugs [patch attached]
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2010-11-22 03:01 EST by Rambetter
Modified: 2010-12-19 12:35:26 EST
1 user (show)

See Also:


Attachments
Fix for console cl_keys.c issues (1.78 KB, patch)
2010-11-22 03:01 EST, Rambetter

Description Rambetter 2010-11-22 03:01:24 EST
Created attachment 2482 [details]
Fix for console cl_keys.c issues

I already sent this out on the ioquake3 mailing list but here it is again.
===========================================

Hi guys.  I'm doing some work on the ioquake3 consoles (both in-game and tty).  I came across 2 bugs in cl_keys.c (in-game console).

1. When a player isn't connected to a server and types a command into the in-game console without a preceding slash, a slash is prepended to the command.  If that existing command without the slash is already at capacity (255 characters), the last character is dropped, a "\" is prepended,  and the cursor is increased by one.  If the cursor was already at the end (meaning at 255), it's now at 256, which is past the command buffer.  This is a bug.  The cursor should stay at 255 in this case.

2. When a player isn't connected to a server and just presses Enter in the in-game console, a "\" is added to the command history.  It's better to not add anything to the command history if the player pressed Enter on an empty line.

I also added two comments which don't fix anything.  You can read those in the patch.  Tell me what you think.

If there is anything wrong with my patch or you'd like to see a change to the patch please let me know and I'll work in it some more.
Comment 1 Tim Angus 2010-12-19 12:35:26 EST
Fixed in r1805.