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

bio->ct is unnecessarily set to zero in opj_bio_flush method #461

Closed
gcode-importer opened this issue Dec 23, 2014 · 1 comment
Closed

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 461

In the opj_bio_flush method,  bio->ct = 0 is not necessary, since 
the opj_bio_byteout call sets ct to either 7 or 8.

See snippets below:



OPJ_BOOL opj_bio_flush(opj_bio_t *bio) {
    bio->ct = 0;
    if (! opj_bio_byteout(bio)) {
        return OPJ_FALSE;
    }
.....

////////////////////////////////////////////

OPJ_BOOL opj_bio_byteout(opj_bio_t *bio) {
    bio->buf = (bio->buf << 8) & 0xffff;
    bio->ct = bio->buf == 0xff00 ? 7 : 8;
.....

Reported by boxerab on 2014-12-23 15:33:30

@gcode-importer
Copy link
Author

This issue was closed by revision r2987.

Reported by mayeut on 2014-12-23 16:05:23

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant