Bug in packetHelper #30

Closed
opened 2020-11-26 16:54:00 +00:00 by tom5079 · 3 comments
tom5079 commented 2020-11-26 16:54:00 +00:00 (Migrated from zxq.co)

There's a bug in readPacketData in packetHelper.pyx
If you try to process FFLOAT which is declared in dataTypes.py you'll have a problem unpacking it.
I could offer bug fix pull request if you want.

There's a bug in readPacketData in [packetHelper.pyx](https://zxq.co/ripple/pep.py/src/branch/master/helpers/packetHelper.pyx) If you try to process FFLOAT which is declared in [dataTypes.py](https://zxq.co/ripple/pep.py/src/branch/master/constants/dataTypes.py) you'll have a problem unpacking it. I could offer bug fix pull request if you want.
Nyo commented 2019-03-14 23:10:31 +00:00 (Migrated from zxq.co)

This is weird, it works fine for me

>>> from helpers import packetHelper
>>> from constants import dataTypes
>>> d = packetHelper.packData(3.14, dataTypes.FFLOAT)
>>> d
b'\xc3\xf5H@'
>>> packetHelper.unpackData(d, dataTypes.FFLOAT)
3.140000104904175
This is weird, it works fine for me ```py >>> from helpers import packetHelper >>> from constants import dataTypes >>> d = packetHelper.packData(3.14, dataTypes.FFLOAT) >>> d b'\xc3\xf5H@' >>> packetHelper.unpackData(d, dataTypes.FFLOAT) 3.140000104904175 ```
Nyo commented 2019-03-14 23:15:08 +00:00 (Migrated from zxq.co)

Oh wait, nevermind 😥

Oh wait, nevermind :disappointed_relieved:
tom5079 commented 2020-11-26 16:54:02 +00:00 (Migrated from zxq.co)

And--
I can't edit my comment xP
pls fix

And-- I can't edit my comment xP pls fix
tom5079 (Migrated from zxq.co) closed this issue 2020-11-26 16:54:05 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ripple/pep.py#30
No description provided.