Fix buffer overflow.

This commit is contained in:
Chad Yates 2020-06-22 20:06:40 -07:00 committed by Ethan Lee
parent b253a810e0
commit e95ef4e98a

View File

@ -68,11 +68,7 @@ namespace SDL2
{ {
if (str == null) if (str == null)
{ {
if (bufferSize > 0) return (byte*) 0;
{
buffer[0] = 0;
}
return buffer;
} }
fixed (char* strPtr = str) fixed (char* strPtr = str)
{ {