Include negative numbers

This commit is contained in:
Matt Nadareski
2022-12-03 23:23:55 -08:00
parent 90d5bd52a2
commit 2c1e087bc6

View File

@@ -25,7 +25,7 @@ namespace BurnOutSharp.Builder
public static byte[] ReadBytes(this byte[] content, ref int offset, int count)
{
// If there's an invalid byte count, don't do anything
if (count == 0)
if (count <= 0)
return null;
byte[] buffer = new byte[count];
@@ -163,7 +163,7 @@ namespace BurnOutSharp.Builder
public static byte[] ReadBytes(this Stream stream, int count)
{
// If there's an invalid byte count, don't do anything
if (count == 0)
if (count <= 0)
return null;
byte[] buffer = new byte[count];