mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
More fixes, some cleanup.
This commit is contained in:
parent
581b91b337
commit
e6752ade04
20 changed files with 193 additions and 361 deletions
|
|
@ -49,7 +49,7 @@ public readonly struct Utf8RelPath : IEquatable< Utf8RelPath >, IComparable< Utf
|
|||
return true;
|
||||
}
|
||||
|
||||
if( !Utf8String.FromString( substring, out var ascii ) || !ascii.IsAscii )
|
||||
if( !Utf8String.FromString( substring, out var ascii, true ) || !ascii.IsAscii )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ public readonly struct Utf8RelPath : IEquatable< Utf8RelPath >, IComparable< Utf
|
|||
return false;
|
||||
}
|
||||
|
||||
var substring = file.FullName[ baseDir.FullName.Length.. ];
|
||||
var substring = file.FullName[ (baseDir.FullName.Length + 1).. ];
|
||||
return FromString( substring, out path );
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ public readonly struct Utf8RelPath : IEquatable< Utf8RelPath >, IComparable< Utf
|
|||
return false;
|
||||
}
|
||||
|
||||
var substring = file.FullName[ baseDir.FullName.Length.. ];
|
||||
var substring = file.FullName[ (baseDir.FullName.Length + 1).. ];
|
||||
return FromString( substring, out path );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public sealed unsafe partial class Utf8String : IDisposable
|
|||
}
|
||||
|
||||
Marshal.FreeHGlobal( ( IntPtr )_path );
|
||||
GC.RemoveMemoryPressure( Length );
|
||||
GC.RemoveMemoryPressure( Length + 1 );
|
||||
_length = AsciiCheckedFlag | AsciiFlag | AsciiLowerCheckedFlag | AsciiLowerFlag | NullTerminatedFlag;
|
||||
_path = Null.NullBytePtr;
|
||||
_crc32 = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue