Fix zero lenght packets bug

This commit is contained in:
Israel Lot
2018-04-16 13:25:56 -03:00
parent 786fa53334
commit e006377e64
@@ -58,9 +58,9 @@ namespace MQTTnet.Serializer
public static byte[] GetRemainingLength(int length)
{
if (length == 0)
if (length <= 0)
{
return new byte[] { (byte)0 };
return new [] { (byte)0 };
}
var bytes = new byte[4];