Fix buffer overflow.
This commit is contained in:
parent
b253a810e0
commit
e95ef4e98a
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user