screen on 64-bit mangles mintty/buffer

Corinna Vinschen corinna-cygwin@cygwin.com
Thu May 15 07:32:00 GMT 2014



Nice detective work, really.  The goldstar is well deservered :)

On May 15 04:00, Shaddy Baddah wrote:
> I quickly worked out that the code has a bug for "%i". At some point
> the code was changed to push and pop the parameters being passed (0 and
> 39 in my eg.). However, the "%i" select/case block was incrementing the
> arguments in a no longer used array for parameters:
> 
> 
> 	    case 'i':
> 		if (p_is_s[0] == 0)
> 		    param[0]++;
> 		if (p_is_s[1] == 0)
> 		    param[1]++;
> 		break;

Unfortunately there's no newer upstream release and this bug is present
in the ncurses 5.9 version in Fedora 20 as well.  From what I gather from the
surrounding code, I *assume* something like this could fix it

            case 'i':
                y = npop();
                x = npop();
                if (p_is_s[0] == 0)
                    y++;
                if (p_is_s[1] == 0)
                    x++;
                npush(x);
                npush(y);
                break;

I'm not sure the relation between x, y, and the p_is_s indices is
correct, though.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140515/32a15abd/attachment.sig>


More information about the Cygwin mailing list