Skip to content

calculator: input integer overflows when > 0x7FFFFFFF(or 2147483647) #6

Open
@liuqun

Description

@liuqun

QLCDNumber overflows when input >= 2147483648. (For example: input 9999999999...9)

https://github.com/mfitzp/15-minute-apps/blob/b99eb330310fe7302ead39473ef0d34cccb3d12d/calculator/calculator.py#L62-L67

Since integer has an limit of 0x7FFFFFFF(or 2147483647), casting it into float using self.stack[-1] = float(v) would be better.

Patch code: liuqun@a960653

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions