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

Error when int[] has group+2 elements #1

Open
nobre84 opened this issue Nov 8, 2011 · 0 comments
Open

Error when int[] has group+2 elements #1

nobre84 opened this issue Nov 8, 2011 · 0 comments

Comments

@nobre84
Copy link

nobre84 commented Nov 8, 2011

Hi, first, thank you for the effort on posting the project up!
I found an issue when the encoded array has group + 2 elements (6, 10, 14, etc)

I fixed by changing:

    switch (length - idx)
    {
        case 3: encodeGroup(buff, values[idx], values[idx++], values[idx++], 0);
        case 2: encodeGroup(buff, values[idx], values[idx++], 0, 0);
        case 1: encodeGroup(buff, values[idx], 0, 0, 0);
    }

to

    switch (length - idx)
    {
        case 3: encodeGroup(buff, values[idx++], values[idx++], values[idx++], 0);
        case 2: encodeGroup(buff, values[idx++], values[idx++], 0, 0);
        case 1: encodeGroup(buff, values[idx++], 0, 0, 0);
    }
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