Prevent crash when custom cbuffer format is larger than buffer