From a42b1e2fbc0115f87ee6cbbb207dd63fd43b7932 Mon Sep 17 00:00:00 2001 From: Rob Riggs Date: Sun, 20 Jun 2021 20:23:28 -0500 Subject: [PATCH] Update callsign decoding based on spec clarification. --- TNC/LinkSetupFrame.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TNC/LinkSetupFrame.h b/TNC/LinkSetupFrame.h index b4db436..95972b1 100644 --- a/TNC/LinkSetupFrame.h +++ b/TNC/LinkSetupFrame.h @@ -63,7 +63,7 @@ struct LinkSetupFrame const auto p = reinterpret_cast(&encoded); encoded_call_t result; - std::copy(p, p + 6, result.begin()); + std::copy(p, p + 6, result.rbegin()); return result; } @@ -74,7 +74,7 @@ struct LinkSetupFrame uint64_t encoded = 0; // This only works on little endian architectures. auto p = reinterpret_cast(&encoded); - std::copy(callsign.begin(), callsign.end(), p); + std::copy(callsign.rbegin(), callsign.rend(), p); // decode each base-40 digit and map them to the appriate character. call_t result;