Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mfast::encoder may change the pmap and templateid. #85

Open
jamesmasika opened this issue Apr 18, 2019 · 0 comments
Open

mfast::encoder may change the pmap and templateid. #85

jamesmasika opened this issue Apr 18, 2019 · 0 comments

Comments

@jamesmasika
Copy link

jamesmasika commented Apr 18, 2019

{
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 jamesmasika changed the title mfast::decoder may change the pmap and templateid. mfast::encoder may change the pmap and templateid. Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant