Skip to content

Commit

Permalink
Fixes in Nca and U8Span
Browse files Browse the repository at this point in the history
  • Loading branch information
Thealexbarney committed Aug 18, 2020
1 parent f2f2111 commit 71824f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LibHac/Common/U8Span.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public U8String ToU8String()
/// </summary>
/// <returns><see langword="true"/> if the span has no buffer.
/// Otherwise, <see langword="false"/>.</returns>
public bool IsNull() => _buffer.IsEmpty;
public unsafe bool IsNull() => (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetReference(_buffer)) == IntPtr.Zero;

/// <summary>
/// Checks if the <see cref="U8Span"/> has no buffer or begins with a null terminator.
Expand Down
2 changes: 1 addition & 1 deletion src/LibHac/Common/U8SpanMutable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public U8StringMutable ToU8String()
/// </summary>
/// <returns><see langword="true"/> if the span has no buffer.
/// Otherwise, <see langword="false"/>.</returns>
public bool IsNull() => _buffer.IsEmpty;
public unsafe bool IsNull() => (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetReference(_buffer)) == IntPtr.Zero;

/// <summary>
/// Checks if the <see cref="U8StringMutable"/> has no buffer or begins with a null terminator.
Expand Down
2 changes: 1 addition & 1 deletion src/LibHac/FsSystem/NcaUtils/Nca.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ private static HierarchicalIntegrityVerificationStorage InitIvfcForRomFs(NcaFsIn
return new HierarchicalIntegrityVerificationStorage(initInfo, integrityCheckLevel, leaveOpen);
}

public IStorage OpenDecryptedHeaderStorage() => OpenHeaderStorage(true);
public IStorage OpenDecryptedHeaderStorage() => OpenHeaderStorage(false);

public IStorage OpenHeaderStorage(bool openEncrypted)
{
Expand Down

0 comments on commit 71824f0

Please sign in to comment.