mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
fix: improve SeString integer decoding and encoding
This commit is contained in:
parent
2aacbee1c8
commit
5d611de8da
5 changed files with 32 additions and 279 deletions
|
|
@ -258,18 +258,5 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
|
|||
return (int)scaledPos;
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected override byte GetMarkerForIntegerBytes(byte[] bytes)
|
||||
{
|
||||
var type = bytes.Length switch
|
||||
{
|
||||
3 => (byte)IntegerType.Int24Special, // used because seen in incoming data
|
||||
2 => (byte)IntegerType.Int16,
|
||||
1 => (byte)IntegerType.None, // single bytes seem to have no prefix at all here
|
||||
_ => base.GetMarkerForIntegerBytes(bytes)
|
||||
};
|
||||
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue