Skip to content

Commit

Permalink
Correct issues stopping ESP from hearing packet
Browse files Browse the repository at this point in the history
  • Loading branch information
nullstalgia committed Aug 10, 2023
1 parent 9a7aec2 commit fcbfe3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/network/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,14 +713,14 @@ void Connection::update() {
}

case PACKET_RECEIVE_LED_OFFSET: {
// Packet type (4) + Packet number (8) + offset in ms (32)
if (len < 44) {
// Packet type (4) + Packet number (8) + offset in ms (4)
if (len < 16) {
m_Logger.warn("Invalid LED offset packet: too short");
break;
}

//uint32_t offset = convert_chars<uint32_t>(&m_Packet[12]);
//ledManager.resetPatternWithOffset(offset);
uint32_t offset = convert_chars<uint32_t>(&m_Packet[12]);
ledManager.resetPatternWithOffset(offset);
break;
}

Expand Down

0 comments on commit fcbfe3b

Please sign in to comment.