Skip to content

Commit

Permalink
fixes logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen committed Sep 7, 2020
1 parent 18ec45a commit a7b2e9c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ReceivedLogicalMessage Deserialize(ReceivedTransportMessage message)
{
var routeSegmentMessage = (RouteSegmentMessage)CreateRouteSegmentMessage(payload);

if (routeSegmentMessage?.After?.Coord !is null)
if (routeSegmentMessage?.After != null & routeSegmentMessage.After?.Coord is null)
return new ReceivedLogicalMessage(message.Headers, new InvalidMessage(routeSegmentMessage), message.Position);

return new ReceivedLogicalMessage(message.Headers, routeSegmentMessage, message.Position);
Expand All @@ -53,7 +53,7 @@ public ReceivedLogicalMessage Deserialize(ReceivedTransportMessage message)
{
var routeNodeMessage = (RouteNodeMessage)CreateRouteNodeMessage(payload);

if (routeNodeMessage?.After?.Coord !is null)
if (routeNodeMessage?.After != null && routeNodeMessage.After?.Coord is null)
return new ReceivedLogicalMessage(message.Headers, new InvalidMessage(routeNodeMessage), message.Position);

return new ReceivedLogicalMessage(message.Headers, routeNodeMessage, message.Position);
Expand Down

0 comments on commit a7b2e9c

Please sign in to comment.