Skip to content

Commit 3294a7d

Browse files
committed
bpo-43231: Correctly calculate the curses color pair limit when checking for it
1 parent ab2d481 commit 3294a7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)