[ALL] Take care of possible null strings

This commit is contained in:
Matt Nadareski
2017-12-14 13:22:22 -08:00
parent 296fc2154c
commit e8d59e6970
9 changed files with 30 additions and 30 deletions

View File

@@ -301,7 +301,7 @@ namespace RombaSharp
if (input.Length == Constants.CRCLength)
{
temp = Utilities.CleanHashData(input, Constants.CRCLength);
if (temp != "")
if (!String.IsNullOrWhiteSpace(temp))
{
crc.Add(temp);
}
@@ -309,7 +309,7 @@ namespace RombaSharp
else if (input.Length == Constants.MD5Length)
{
temp = Utilities.CleanHashData(input, Constants.MD5Length);
if (temp != "")
if (!String.IsNullOrWhiteSpace(temp))
{
md5.Add(temp);
}
@@ -317,7 +317,7 @@ namespace RombaSharp
else if (input.Length == Constants.SHA1Length)
{
temp = Utilities.CleanHashData(input, Constants.SHA1Length);
if (temp != "")
if (!String.IsNullOrWhiteSpace(temp))
{
sha1.Add(temp);
}