Closed ellensp closed 11 months ago
I missed a bug in processing pasted rle16 encoded data
the code if (s.match(/0x[0-9a-f]+/i)) { // Hex is meant to match hexadecimal encoded strings only eg 0x12FE
if (s.match(/0x[0-9a-f]+/i)) { // Hex
It doesn't trigger on "marlin_logo_195x59x16_rle16" which is what I did my testing on.
But it does match on "marlin_logo_240x250x16_rle16" Causing the image to be incorrectly decoded
Updated the RE to /0x[0-9a-f]+(?![0-9x_])/i to exclude the false positive.
/0x[0-9a-f]+(?![0-9x_])/i
I missed a bug in processing pasted rle16 encoded data
the code
if (s.match(/0x[0-9a-f]+/i)) { // Hex
is meant to match hexadecimal encoded strings only eg 0x12FEIt doesn't trigger on "marlin_logo_195x59x16_rle16" which is what I did my testing on.
But it does match on "marlin_logo_240x250x16_rle16" Causing the image to be incorrectly decoded
Updated the RE to
/0x[0-9a-f]+(?![0-9x_])/i
to exclude the false positive.