From 80e746684030b2e0aa340dfc5f89a8711dcafabc Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Sun, 14 Nov 2021 17:44:45 -0700 Subject: [PATCH] Add parameterless constructor to Fs.Path We can finally initialize Fs.Path correctly thanks to C# 10 allowing parameterless constructors on structs --- src/LibHac/Fs/Common/Path.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LibHac/Fs/Common/Path.cs b/src/LibHac/Fs/Common/Path.cs index 502e8033..f3acb9bc 100644 --- a/src/LibHac/Fs/Common/Path.cs +++ b/src/LibHac/Fs/Common/Path.cs @@ -177,6 +177,14 @@ public ref struct Path private int _writeBufferLength; private bool _isNormalized; + public Path() + { + _string = EmptyPath; + _writeBuffer = null; + _writeBufferLength = 0; + _isNormalized = false; + } + public void Dispose() { byte[] writeBuffer = Shared.Move(ref _writeBuffer);