Skip to content

Commit

Permalink
Fix string's expected length for rfid-cmnd via mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
biologist79 committed Sep 11, 2024
1 parent 6fa1f17 commit b2a9c7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void Mqtt_ClientCallback(const char *topic, const byte *payload, uint32_t length
}
// New track to play? Take RFID-ID as input
else if (strcmp_P(topic, topicRfidCmnd) == 0) {
if (receivedString.size() >= cardIdStringSize) {
if (receivedString.size() >= (cardIdStringSize - 1)) {
xQueueSend(gRfidCardQueue, receivedString.data(), 0);
} else {
System_IndicateError();
Expand Down
2 changes: 1 addition & 1 deletion src/revision.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#include "gitrevision.h"
constexpr const char softwareRevision[] = "Software-revision: 20240609-1-DEV";
constexpr const char softwareRevision[] = "Software-revision: 20240911-2-DEV";

0 comments on commit b2a9c7a

Please sign in to comment.