mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-25 10:49:01 +00:00
Fix base64 image parser returning wrong hashes
This commit is contained in:
parent
4107ecc654
commit
07769e0349
1 changed files with 2 additions and 2 deletions
|
@ -277,8 +277,8 @@ public static class FileHelper
|
|||
private static byte[]? TryParseBase64Data(string b64)
|
||||
{
|
||||
Span<byte> buffer = new(new byte[b64.Length]);
|
||||
bool valid = Convert.TryFromBase64String(b64, buffer, out _);
|
||||
return valid ? buffer.ToArray() : null;
|
||||
bool valid = Convert.TryFromBase64String(b64, buffer, out int bytesWritten);
|
||||
return valid ? buffer[..bytesWritten].ToArray() : null;
|
||||
}
|
||||
|
||||
public static async Task<string?> ParseBase64Image(string? image)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue