diff --git a/DotnetCliVersion.txt b/DotnetCliVersion.txt index f7744831..61bb1836 100644 --- a/DotnetCliVersion.txt +++ b/DotnetCliVersion.txt @@ -1 +1 @@ -3.1.101 \ No newline at end of file +3.1.200 \ No newline at end of file diff --git a/build/CodeGen/ResultCodegen.cs b/build/CodeGen/ResultCodegen.cs index 6ca773b2..6a4ffc51 100644 --- a/build/CodeGen/ResultCodegen.cs +++ b/build/CodeGen/ResultCodegen.cs @@ -25,6 +25,7 @@ namespace LibHacBuild.CodeGen SetEmptyResultValues(modules); ValidateResults(modules); + CheckForDuplicates(modules); ValidateHierarchy(modules); CheckIfAggressiveInliningNeeded(modules); @@ -119,6 +120,24 @@ namespace LibHacBuild.CodeGen } } + private static void CheckForDuplicates(ModuleInfo[] modules) + { + foreach (ModuleInfo module in modules) + { + var set = new HashSet(); + + foreach (ResultInfo result in module.Results) + { + long description = (long)result.DescriptionStart << 32 | (uint)result.DescriptionEnd; + + if (!set.Add(description)) + { + throw new InvalidDataException($"Duplicate result {result.Module}-{result.DescriptionStart}-{result.DescriptionEnd}."); + } + } + } + } + private static void ValidateHierarchy(ModuleInfo[] modules) { foreach (ModuleInfo module in modules) diff --git a/build/_build.csproj b/build/_build.csproj index 33ce19a2..e852b673 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -11,9 +11,9 @@ - + - + diff --git a/src/LibHac/Fs/Shim/Host.cs b/src/LibHac/Fs/Shim/Host.cs index 1164dbbb..48786e31 100644 --- a/src/LibHac/Fs/Shim/Host.cs +++ b/src/LibHac/Fs/Shim/Host.cs @@ -43,6 +43,7 @@ namespace LibHac.Fs.Shim if (nameBuffer.Length < requiredNameBufferSize) return ResultFs.TooLongPath.Log(); + // ReSharper disable once RedundantAssignment int size = new U8StringBuilder(nameBuffer).Append(HostRootFileSystemPath).Append(_path.Str).Length; Debug.Assert(size == requiredNameBufferSize - 1); @@ -58,6 +59,7 @@ namespace LibHac.Fs.Shim Debug.Assert(nameBuffer.Length >= requiredNameBufferSize); + // ReSharper disable once RedundantAssignment int size = StringUtils.Copy(nameBuffer, HostRootFileSystemPath); Debug.Assert(size == requiredNameBufferSize - 1); diff --git a/src/LibHac/LibHac.csproj b/src/LibHac/LibHac.csproj index 9b02585c..113fcad4 100644 --- a/src/LibHac/LibHac.csproj +++ b/src/LibHac/LibHac.csproj @@ -2,7 +2,7 @@ Library - 0.9.0 + 0.10.0 netcoreapp3.0;netstandard2.1 8.0 true diff --git a/src/LibHac/Nacp.cs b/src/LibHac/Nacp.cs index 96ddec9b..f71d6b62 100644 --- a/src/LibHac/Nacp.cs +++ b/src/LibHac/Nacp.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.IO; namespace LibHac { + [Obsolete("This class has been deprecated. LibHac.Ns.ApplicationControlProperty should be used instead.")] public class Nacp { public NacpDescription[] Descriptions { get; } = new NacpDescription[0x10]; diff --git a/src/hactoolnet/hactoolnet.csproj b/src/hactoolnet/hactoolnet.csproj index 6a3cf580..132ec3bc 100644 --- a/src/hactoolnet/hactoolnet.csproj +++ b/src/hactoolnet/hactoolnet.csproj @@ -7,7 +7,7 @@ - 0.9.0 + 0.10.0 $(MSBuildProjectDirectory)=C:/hactoolnet/