Only copy memory if the size is greater than zero
Only copy memory if the size is greater than zero

The first section (index 0) always has no data (null) and length 0.
This check guards against calling memcpy with nullptr, which is ub.

googlestadia/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc