Skip to content

Commit

Permalink
Handle numbers which have 0 for 32 least significant bits
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdelisle committed Oct 21, 2018
1 parent 59212ef commit 631462e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion subnode/MsgCore.c
Expand Up @@ -302,11 +302,15 @@ static Iface_DEFUN incoming(struct Message* msg, struct Iface* interRouterIf)
}

int64_t* verP = Dict_getIntC(content, "p");
if (!verP || !*verP) {
if (!verP) {
Log_debug(mcp->log, "DROP Message without version");
return NULL;
}
addr.protocolVersion = *verP;
if (!addr.protocolVersion) {
Log_debug(mcp->log, "DROP Message with zero version");
return NULL;
}

String* q = Dict_getStringC(content, "q");

Expand Down

0 comments on commit 631462e

Please sign in to comment.