In DX/Device.cpp:1136, this code can be seen:
memcpy(ResDataPtr, ResData.get(), R.size());
// Zero any remaining bytes
if (R.size() < CBVSize) {
void *ExtraData = static_cast<char *>(ResDataPtr) + R.size();
memset(ExtraData, 0, CBVSize - R.size() - 1);
}
I don't see why the -1 is necessary. The final byte should also be zeroed out.
This hasn't manifested into a crash or incorrect results or anything, but the -1 doesn't seem to have a good reason to exist.