Multiple corrections to img_jpg unpacking in HG-3 images.
Changes
Switched RGB channel order during pixels copy: "img_jpg" tag format unpack operation was swapping RGB -> BGR when already in BGR format.
Removed second null-terminator in ASCII equals check: "img_al" tag name had two null-terminator checks. And apparently... CatSystem 2 does not guarantee anything after the first null-terminator in a fixed-length string (yikes). This can be observed with a few assets in the cs2_full_v301 toolset:
Multiple corrections to
img_jpg
unpacking in HG-3 images.Changes
"img_jpg"
tag format unpack operation was swapping RGB -> BGR when already in BGR format."img_al"
tag name had two null-terminator checks. And apparently... CatSystem 2 does not guarantee anything after the first null-terminator in a fixed-length string (yikes). This can be observed with a few assets in thecs2_full_v301
toolset:69 6D 67 5F 61 6C 00 B5
:"img_al.5"
"img_al
tags will have a clean two null bytes in the tag name, this seems to only be an infrequent issue.