Skip to content

Instantly share code, notes, and snippets.

@s-l-teichmann
Created June 23, 2013 07:43
Show Gist options
  • Save s-l-teichmann/5844198 to your computer and use it in GitHub Desktop.
Save s-l-teichmann/5844198 to your computer and use it in GitHub Desktop.
diff --git a/src/connection.cpp b/src/connection.cpp
index 7bff5b1..b910841 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -1433,7 +1433,8 @@ bool Connection::checkIncomingBuffers(Channel *channel, u16 &peer_id,
else if(type == TYPE_RELIABLE)
{
// Recursive reliable packets not allowed
- assert(reliable == false);
+ if(reliable)
+ throw InvalidIncomingDataException("found nested reliable packets.");
if(packetdata.getSize() < RELIABLE_HEADER_SIZE)
throw InvalidIncomingDataException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment