Skip to content

Commit

Permalink
Merge pull request #23 from Devolutions/add-checks-for-formart-except…
Browse files Browse the repository at this point in the history
…ions

add checks for format exceptions in csharp wrapper
  • Loading branch information
MathieuMorrissette authored Sep 19, 2019
2 parents 621edd8 + cb473cb commit 78fc69e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devolutionscrypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "devolutionscrypto"
version = "0.1.2"
version = "0.1.3"
authors = ["Philippe Dugre <[email protected]>", "Mathieu Morrissette <[email protected]>"]
edition = "2018"
readme = "../README.md"
Expand Down
9 changes: 8 additions & 1 deletion wrappers/csharp/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ public static string ByteArrayToString(byte[] data)
return null;
}

return Encoding.UTF8.GetString(data);
try
{
return Encoding.UTF8.GetString(data);
}
catch
{
return null;
}
}
}
}

0 comments on commit 78fc69e

Please sign in to comment.