[dylan-lang/opendylan] 0b529c: [deuce] Fix out-of-bounds dline access.
GitHub <[email protected]>
| Newsgroups | gmane.comp.lang.dylan.gwydion.cvs |
|---|---|
| Message-ID | <54a2bd678864c_284f3fb37c65b2a0903dc@hookshot-fe1-cp1-prd.iad.github.net.mail> |
Branch: refs/heads/master
Home: https://github.com/dylan-lang/opendylan
Commit: 0b529c31fd15a91e2717d6c86ae10b44b30a95f0
https://github.com/dylan-lang/opendylan/commit/0b529c31fd15a91e2717d6c86ae10b44b30a95f0
Author: Bruce Mitchener <[email protected]>
Date: 2014-12-28 (Sun, 28 Dec 2014)
Changed paths:
M sources/deuce/display.dylan
Log Message:
-----------
[deuce] Fix out-of-bounds dline access.
This could get into a situation where, for example, max-y would be
99, line-y would be continually iterating and increasing and line-height
would be 1, since this was happening in terminal mode.
This is clearly an error in the code as this would happen when resizing:
let new-size :: <integer>
= min(max-y, floor(max(ceiling/(max-y, 10), n-slots * 1.5)));
let new-lines :: <simple-object-vector>
= make(<simple-object-vector>, size: new-size);
and then after new-lines is moved to be lines:
dline := lines[n-lines];
So, n-lines needs to be less than max-y and not potentially equal
to it. When line-height is 1, n-lines and line-y are growing at
the same rate and it is more clear that line-y must also remain
less than (and not less than or equal to) max-y.
Commit: c44e005ae737cd031a9fe51693169720cebeb6c3
https://github.com/dylan-lang/opendylan/commit/c44e005ae737cd031a9fe51693169720cebeb6c3
Author: Bruce Mitchener <[email protected]>
Date: 2014-12-30 (Tue, 30 Dec 2014)
Changed paths:
M sources/deuce/display.dylan
Log Message:
-----------
Merge pull request #842 from dylan-lang/deuce-dline-fix
[deuce] Fix out-of-bounds dline access.
Compare: https://github.com/dylan-lang/opendylan/compare/790b4a294592...c44e005ae737
_______________________________________________
chatter mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/chatter