Change MAXSKINS from 256 to 255
- Feb 22, 2024
-
-
Zwip-Zwap Zapony authored
A value of -1 is sometimes reserved for "no skin", leaving 255 other values for skin numbers
56c61a80
-
!1466 (merged) increased MAXSKINS
from 32 to 256, with a comment saying that it mustn't be set higher than 256 as some pieces of code use an 8-bit integer (0 to 255, or 256 different values) for skin numbers.
However, some of those pieces reserve a value of -1 (255) to mean "no skin", leaving only 0 to 254, or 255 different values, free for skins to occupy. This merge request reduces MAXSKINS
to 255 so that a 256th skin won't conflict with "no skin".
For changelog purposes, this should be bundled into the "Raise the skin limit" part.
A value of -1 is sometimes reserved for "no skin", leaving 255 other values for skin numbers