Skip to content

Commit

Permalink
Topic matching bug with trailing / eclipse#174
Browse files Browse the repository at this point in the history
  • Loading branch information
icraggs committed Jul 10, 2023
1 parent 1c3af63 commit a3444a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MQTTClient-C/src/MQTTClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static char isTopicMatched(char* topicFilter, MQTTString* topicName)
curn++;
};

return (curn == curn_end) && (*curf == '\0');
return (curn == curn_end) && (*curf == '\0' || *curf == '#');
}


Expand Down
2 changes: 1 addition & 1 deletion MQTTClient/src/MQTTClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ bool MQTT::Client<Network, Timer, a, b>::isTopicMatched(char* topicFilter, MQTTS
curn++;
};

return (curn == curn_end) && (*curf == '\0');
return (curn == curn_end) && (*curf == '\0' || *curf == '#');
}


Expand Down

0 comments on commit a3444a2

Please sign in to comment.