1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Softer fail

This commit is contained in:
Brian Fiete 2020-12-28 09:10:25 -08:00
parent 8a63a7ed80
commit 10f47cdc8a

View file

@ -4821,6 +4821,12 @@ uint8* COFF::CvReadStream(int streamIdx, int* outSize)
if (streamIdx >= mCvStreamSizes.size())
return NULL;
if ((streamIdx < 0) || (streamIdx >= mCvStreamSizes.mSize))
{
Fail(StrFormat("Invalid PDB stream index: %d", streamIdx));
return NULL;
}
int streamSize = mCvStreamSizes[streamIdx];
if (outSize != NULL)
*outSize = streamSize;