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

Bug in SbeOtfDecoder.cpp in case Ir::CHAR: #259

Closed
zhenglu0 opened this issue Apr 23, 2015 · 1 comment
Closed

Bug in SbeOtfDecoder.cpp in case Ir::CHAR: #259

zhenglu0 opened this issue Apr 23, 2015 · 1 comment

Comments

@zhenglu0
Copy link

Hi,

I am using the SbeOtfDecoder to decode the CME message and I found it is not decoding the messages correctly in the case Ir::CHAR:

            case Ir::CHAR:
                if (f.length(index) == 1)
                {
                    std::cout << " type=CHAR value=\"" << (char)f.getUInt(index) << "\"";
                }
                else
                {
                    char tmp[1024];

                    // copy data to temp array and print it out.
                    f.getArray(index, tmp, 0, f.length(index));
                    std::cout << " type=CHAR value=\"" << std::string(tmp, f.length(index)) << "\"";
                }

in the else statement, the string we get will not get null terminator sometimes. I was just wondering how to solve this issue.

Thanks.

@tmontgomery
Copy link
Contributor

C++ OTF decoder has been significantly changed. So, closing.

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

2 participants