This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: screen on 64-bit mangles mintty/buffer



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

Attachment: pgpukpO0vCY49.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]