mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix(combatlog): relax packed GUID minimum-size gates
This commit is contained in:
parent
c9467778dc
commit
80d59a80aa
1 changed files with 5 additions and 4 deletions
|
|
@ -3703,8 +3703,9 @@ bool CastFailedParser::parse(network::Packet& packet, CastFailedData& data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpellStartParser::parse(network::Packet& packet, SpellStartData& data) {
|
bool SpellStartParser::parse(network::Packet& packet, SpellStartData& data) {
|
||||||
// Upfront validation: packed GUID(1-8) + packed GUID(1-8) + castCount(1) + spellId(4) + castFlags(4) + castTime(4) = 22 bytes minimum
|
// Packed GUIDs are variable-length; only require minimal packet shape up front:
|
||||||
if (packet.getSize() - packet.getReadPos() < 22) return false;
|
// two GUID masks + castCount(1) + spellId(4) + castFlags(4) + castTime(4).
|
||||||
|
if (packet.getSize() - packet.getReadPos() < 15) return false;
|
||||||
|
|
||||||
size_t startPos = packet.getReadPos();
|
size_t startPos = packet.getReadPos();
|
||||||
if (!hasFullPackedGuid(packet)) {
|
if (!hasFullPackedGuid(packet)) {
|
||||||
|
|
@ -3750,8 +3751,8 @@ bool SpellGoParser::parse(network::Packet& packet, SpellGoData& data) {
|
||||||
data = SpellGoData{};
|
data = SpellGoData{};
|
||||||
|
|
||||||
// Packed GUIDs are variable-length, so only require the smallest possible
|
// Packed GUIDs are variable-length, so only require the smallest possible
|
||||||
// shape up front: 2 GUID masks + fixed fields through missCount.
|
// shape up front: 2 GUID masks + fixed fields through hitCount.
|
||||||
if (packet.getSize() - packet.getReadPos() < 17) return false;
|
if (packet.getSize() - packet.getReadPos() < 16) return false;
|
||||||
|
|
||||||
size_t startPos = packet.getReadPos();
|
size_t startPos = packet.getReadPos();
|
||||||
if (!hasFullPackedGuid(packet)) {
|
if (!hasFullPackedGuid(packet)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue