From 2c1e087bc6f05744b06d3b58b749d719d63ed824 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 3 Dec 2022 23:23:55 -0800 Subject: [PATCH] Include negative numbers --- BurnOutSharp.Builder/Extensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp.Builder/Extensions.cs b/BurnOutSharp.Builder/Extensions.cs index b1436181..f05b359c 100644 --- a/BurnOutSharp.Builder/Extensions.cs +++ b/BurnOutSharp.Builder/Extensions.cs @@ -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];