From 29248a99f3c5e65cb707b62c89c680dfa3efc445 Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Sat, 10 Mar 2018 15:16:54 -0300 Subject: [PATCH] Fix NXDN layer3 encode --- NXDNLayer3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NXDNLayer3.cpp b/NXDNLayer3.cpp index 51c9dd62a..50e2fa1eb 100644 --- a/NXDNLayer3.cpp +++ b/NXDNLayer3.cpp @@ -62,8 +62,8 @@ void CNXDNLayer3::encode(unsigned char* bytes, unsigned int length, unsigned int assert(bytes != NULL); for (unsigned int i = 0U; i < length; i++, offset++) { - bool b = READ_BIT1(m_data, i); - WRITE_BIT1(bytes, offset, b); + bool b = READ_BIT1(m_data, offset); + WRITE_BIT1(bytes, i, b); } }