mFAST icon indicating copy to clipboard operation
mFAST copied to clipboard

mfast::encoder may change the pmap and templateid.

Open jamesmasika opened this issue 5 years ago • 0 comments

{ char * beg = &buff[0]; mfast::message_cref orimsg = decoder.decode(first, last, first_message); //then i encode the orimsg //encoder.template_with_id(orimsg .the_id); beg += encoder.encode(orimsg , beg, end - beg, first_message); first_message = false; } //then i decode the new buff right now const char *ppmap = &buff[0]; { const char *f2 = &buff[0]; mfast::message_cref msg = decoder.decode(f2, beg , first_message); }

//but i printed the pmap and template, it did change the pmap if some optional fields had no values while (!(*ppmap & 0x80)) { printf("%02x-", *ppmap); ppmap++; } printf("%02x-", *ppmap); ppmap++; //////////////////////////////////////////////////////////// // and i try the release version 1.2.1, it can't decode any message, there was something missing in the <decimal_cref.cpp>

jamesmasika avatar Apr 18 '19 04:04 jamesmasika