Skip to content

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

@jamesmasika

Description

@jamesmasika

{
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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions