Skip to content

Conversation

@martyy665
Copy link
Contributor

Fix tid overflow issue when tid is zero.

These two snippets are NOT the same - the difference appears when the numeric variable reaches zero (i.e. overflows):

if not tid :
    ...
if tid is None :
    ....

Reference:
#2173

Fix tid overflow issue when tid is zero
@martyy665 martyy665 changed the title Update transaction.py Fix condition to eliminate TID overflow issue Apr 23, 2024
Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct they are not the same. yours test for none and zero.

@janiversen janiversen merged commit a48aeeb into pymodbus-dev:dev Apr 23, 2024
@janiversen
Copy link
Collaborator

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants