mirror of https://github.com/oxen-io/lokinet
Fix version encoding
We are reinterpret_cast'ing the version to a string to send it as raw bytes, but it was sending \x00\x00\x09 instead of \x00\x09\x0a because the version constant was actually a uint16_t array. This just makes the version constant a uint8_t array instead so that it works (and I am not at all worried about any version component getting larger than 255).
This commit is contained in:
parent
4c1f6112a7
commit
1a7f47f5cd
|
@ -4,7 +4,7 @@
|
|||
namespace llarp
|
||||
{
|
||||
// clang-format off
|
||||
const std::array<uint16_t, 3> LOKINET_VERSION{{@lokinet_VERSION_MAJOR@, @lokinet_VERSION_MINOR@, @lokinet_VERSION_PATCH@}};
|
||||
const std::array<uint8_t, 3> LOKINET_VERSION{{@lokinet_VERSION_MAJOR@, @lokinet_VERSION_MINOR@, @lokinet_VERSION_PATCH@}};
|
||||
const char* const LOKINET_VERSION_TAG = "@VERSIONTAG@";
|
||||
const char* const LOKINET_VERSION_FULL = "lokinet-@lokinet_VERSION_MAJOR@.@lokinet_VERSION_MINOR@.@lokinet_VERSION_PATCH@-@LOKINET_VERSION_TAG@";
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
namespace llarp
|
||||
{
|
||||
// Given a full lokinet version of: lokinet-1.2.3-abc these are:
|
||||
extern const std::array<uint16_t, 3> LOKINET_VERSION;
|
||||
extern const std::array<uint8_t, 3> LOKINET_VERSION;
|
||||
extern const char* const LOKINET_VERSION_TAG;
|
||||
extern const char* const LOKINET_VERSION_FULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue