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

Bad checksum on 'cdata' types #1561

Closed
fsitedev opened this issue Jun 27, 2016 · 1 comment
Closed

Bad checksum on 'cdata' types #1561

fsitedev opened this issue Jun 27, 2016 · 1 comment
Assignees
Labels
breaking change bug Something isn't working customer
Milestone

Comments

@fsitedev
Copy link

require('digest').crc32(10863919174838990);

  • 1660621899

require('digest').crc32(10863919174838991);

  • 1660621899
@GeorgyKirichenko GeorgyKirichenko self-assigned this Jun 27, 2016
@rtsisyk rtsisyk added this to the 1.7.0 milestone Jun 27, 2016
@rtsisyk
Copy link
Contributor

rtsisyk commented Jun 27, 2016

 update = function(self, str)
        str = tostring(str or '')
        self.value = ffi.C.crc32_calc(self.value, str, string.len(str))
    end,

tostring(str or '') is a BUG. "any object" to "bytearray" is a separate feature. Don't rely to tostring() for that. tostring() call should be removed. Since this change is not backward-compatible, I added 1.7.0 tag.

@rtsisyk rtsisyk added the bug Something isn't working label Jun 27, 2016
@kostja kostja modified the milestones: 1.7.1, 1.7.2 Jul 11, 2016
@kostja kostja modified the milestones: 1.7.3, 1.7.2 Sep 1, 2016
@rtsisyk rtsisyk assigned rtsisyk and unassigned GeorgyKirichenko Sep 27, 2016
@kostja kostja added the prio2 label Sep 27, 2016
@rtsisyk rtsisyk modified the milestones: 1.7.2, 1.7.3 Sep 28, 2016
@rtsisyk rtsisyk removed the prio2 label Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bug Something isn't working customer
Projects
None yet
Development

No branches or pull requests

4 participants