[Renderers/Web] treat RenderCommand.commandType as uint8_t instead of uint32_t (#162)

This commit is contained in:
vince 2025-01-05 02:34:16 +01:00 committed by GitHub
parent bcb555fd10
commit 723f59dffd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View file

@ -317,7 +317,9 @@
for (let i = 0; i < length; i++, arrayOffset += renderCommandSize) {
let renderCommand = readStructAtAddress(arrayOffset, renderCommandDefinition);
let boundingBox = renderCommand.boundingBox;
switch(renderCommand.commandType.value) {
// note: commandType is packed to uint8_t and has 3 garbage bytes of padding
switch(renderCommand.commandType.value & 0xff) {
case (CLAY_RENDER_COMMAND_TYPE_NONE): {
break;
}