prismarine-chunk icon indicating copy to clipboard operation
prismarine-chunk copied to clipboard

PaletteStorage.incrementPalette can go out of bounds

Open lowlines opened this issue 2 years ago • 1 comments

https://github.com/PrismarineJS/prismarine-chunk/blob/0f4ec64bd0ef8a84f04d825358dd1443e4310aa6/src/bedrock/common/PalettedStorage.js#L95-L102

If you have bitsPerBlock size that causes rounding on the wordCount, this double for loop will go beyond the 4096 block range and throw and error.

lowlines avatar May 28 '22 18:05 lowlines

Please open PR if you have a fix.

extremeheat avatar Jun 04 '22 06:06 extremeheat