URL:
<http://savannah.gnu.org/bugs/?32267>
Summary: Latent bug in xterm mouse handling?
Project: GNU Screen
Submitted by: None
Submitted on: Thu 27 Jan 2011 09:35:02 PM UTC
Category: Program Logic
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: Cur Dev Sources
Fixed Release: None
Planned Release: None
Work Required: None
_______________________________________________________
Details:
Hi all,
While studying the code with the idea of adding support for xterm's new
"extended mouse mode" I noticed the following near display.c:3575
if (i > 5 && bp[0] == 033 && bp[1] == '[' && bp[2] == 'M')
{
bp++;
i--;
}
else if (i < 5 || bp[0] != 0233 || bp[1] != 'M')
continue;
The second conditional looks like a bug to me, based on what I know of vt200
mouse codes (bp[0] should never contain '0233' and 'M' should live in bp[2],
not bp[1]).
Can somebody confirm whether this is a latent bug? Also, is there a reason
why this wouldn't work:
if ( i < 5 || bp[0] != 033 || bp[1] != '[' || bp[2] != 'M')
continue;
bp++;
i--;
Regards,
Ryan
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32267>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/