Skip to content

Commit

Permalink
Merge pull request #32 from F4FXL/bugfix/IcomHardware_#31
Browse files Browse the repository at this point in the history
correct reading of data pointer #31
  • Loading branch information
F4FXL committed Apr 25, 2023
2 parents 6871949 + ee21550 commit 8ee55c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Common/HeardData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ bool CHeardData::setIcomRepeaterData(const unsigned char *data, unsigned int len
assert(data != NULL);
assert(length >= 26U);

std::string sdata((const char *)data);
std::string suser((const char *)data + 10U);
std::string srptr((const char *)data + 18U);

m_user = sdata.substr(10, LONG_CALLSIGN_LENGTH);
m_repeater = sdata.substr(18, LONG_CALLSIGN_LENGTH);
m_user = suser.substr(LONG_CALLSIGN_LENGTH);
m_repeater = srptr.substr(LONG_CALLSIGN_LENGTH);

m_address = address;
m_port = port;
Expand Down

0 comments on commit 8ee55c9

Please sign in to comment.