- Add safety around extra chat GUID parsing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
||||
<PropertyGroup>
|
||||
<Version>1.34.1</Version>
|
||||
<Version>1.34.2</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
@@ -158,9 +158,18 @@ internal partial class Message
|
||||
{
|
||||
// this does an encode and clone every time it's accessed, so cache
|
||||
var data = raw.Data;
|
||||
try
|
||||
{
|
||||
if (data[1] == 0x27 && data[2] == 18 && data[3] == 0x20)
|
||||
return new Guid(data[4..^1]);
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
Plugin.Log.Error(ex, "Failed to parse extra chat channel GUID");
|
||||
Plugin.Log.Error($"Byte Array: ${string.Join(", ", data[4..^1])}");
|
||||
return Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
return Guid.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user