Skip to content

Commit ae77e3b

Browse files
committed
2.1.5.0
1 parent beef081 commit ae77e3b

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

Alpha/Alpha.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>2.1.4.0</Version>
3+
<Version>2.1.5.0</Version>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net9.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>

Alpha/Utils/Util.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Diagnostics;
22
using System.Numerics;
33
using System.Runtime.InteropServices;
4+
using System.Text;
45
using Hexa.NET.ImGui;
56
using Lumina.Data.Files;
67
using NativeFileDialog.Extended;
@@ -40,11 +41,12 @@ public static void OpenLink(string url) {
4041

4142
public static (uint Folder, uint File) GetHash(string path) {
4243
path = path.ToLower();
43-
var folder = path.AsSpan(0, path.LastIndexOf('/'));
44-
var file = path.AsSpan(path.LastIndexOf('/') + 1);
44+
var bytes = Encoding.UTF8.GetBytes(path); // `char` is utf16 lol
45+
var folder = bytes.AsSpan(0, path.LastIndexOf('/'));
46+
var file = bytes.AsSpan(path.LastIndexOf('/') + 1);
4547

46-
var folderHash = Lumina.Misc.Crc32.Get(MemoryMarshal.Cast<char, byte>(folder));
47-
var fileHash = Lumina.Misc.Crc32.Get(MemoryMarshal.Cast<char, byte>(file));
48+
var folderHash = Lumina.Misc.Crc32.Get(folder);
49+
var fileHash = Lumina.Misc.Crc32.Get(file);
4850
return (folderHash, fileHash);
4951
}
5052

0 commit comments

Comments
 (0)