Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d020496

Browse files
authored
bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541)
1 parent ab2d481 commit d020496

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_curses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ def get_pair_limit(self):
930930
# range may be restricted, so we need to check if the limit is still
931931
# correct
932932
try:
933-
curses.init_pair(pair_limit, 0, 0)
933+
curses.init_pair(pair_limit - 1, 0, 0)
934934
except ValueError:
935935
pair_limit = curses.COLOR_PAIRS
936936
return pair_limit

0 commit comments

Comments
 (0)