Commit d40d413
committed
gh-156951: Do not truncate the color pair in curses.slk_color()
slk_color() cast its color pair to a short before calling ncurses, while
the pair converter accepts pairs up to INT_MAX on a build with extended
color support. Pairs of 32768 and above were rejected although the rest
of the module accepts them, and a pair whose low 16 bits named a valid
pair was silently applied in place of the one that was asked for.
Call extended_slk_color() under the module's existing
_NCURSES_EXTENDED_COLOR_FUNCS guard, as slk_attr_set() and
window.color_set() already do, and keep the legacy call for builds
without it.1 parent 1a2e3a0 commit d40d413
2 files changed
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3479 | 3479 | | |
3480 | 3480 | | |
3481 | 3481 | | |
3482 | | - | |
| 3482 | + | |
3483 | 3483 | | |
3484 | 3484 | | |
3485 | | - | |
| 3485 | + | |
3486 | 3486 | | |
3487 | 3487 | | |
3488 | 3488 | | |
| |||
3565 | 3565 | | |
3566 | 3566 | | |
3567 | 3567 | | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
3568 | 3588 | | |
3569 | 3589 | | |
3570 | 3590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8863 | 8863 | | |
8864 | 8864 | | |
8865 | 8865 | | |
8866 | | - | |
| 8866 | + | |
| 8867 | + | |
| 8868 | + | |
| 8869 | + | |
| 8870 | + | |
| 8871 | + | |
| 8872 | + | |
8867 | 8873 | | |
8868 | 8874 | | |
8869 | 8875 | | |
| |||
0 commit comments