yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
448 stars 46 forks source link

SquidLayers initPalette() allocating too large of an arraylist #173

Closed SquidPony closed 7 years ago

SquidPony commented 7 years ago

private void initPalettes() { palette = new ArrayList<>(256); Collections.addAll(palette, SColor.LIMITED_PALETTE); }

256 should be SColor.LIMITED_PALETTE.length

(I know it's a dumb small thing, I just don't have the lib set up to edit at the moment and don't want to forget this)

SquidPony commented 7 years ago

done

from what I can tell the extra size wouldn't have been directly settable, so this shouldn't break any code