File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11using System . Diagnostics ;
22using System . Numerics ;
33using System . Runtime . InteropServices ;
4+ using System . Text ;
45using Hexa . NET . ImGui ;
56using Lumina . Data . Files ;
67using 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
You can’t perform that action at this time.
0 commit comments