Fix bad string interpolation in MaskToCidr

This commit is contained in:
Shadowghost 2023-07-07 08:52:14 +02:00
parent a0d13a2418
commit 266d55b7aa

View File

@ -104,7 +104,7 @@ public static partial class NetworkExtensions
Span<byte> bytes = stackalloc byte[mask.AddressFamily == AddressFamily.InterNetwork ? Network.IPv4MaskBytes : Network.IPv6MaskBytes]; Span<byte> bytes = stackalloc byte[mask.AddressFamily == AddressFamily.InterNetwork ? Network.IPv4MaskBytes : Network.IPv6MaskBytes];
if (!mask.TryWriteBytes(bytes, out var bytesWritten)) if (!mask.TryWriteBytes(bytes, out var bytesWritten))
{ {
Console.WriteLine("Unable to write address bytes, only {bytesWritten} bytes written."); Console.WriteLine("Unable to write address bytes, only ${bytesWritten} bytes written.");
} }
var zeroed = false; var zeroed = false;