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

Overflow issue when sending money in multiplayer #7750

Closed
telk5093 opened this issue Sep 22, 2019 · 0 comments · Fixed by #8499
Closed

Overflow issue when sending money in multiplayer #7750

telk5093 opened this issue Sep 22, 2019 · 0 comments · Fixed by #8499
Milestone

Comments

@telk5093
Copy link
Contributor

telk5093 commented Sep 22, 2019

Version of OpenTTD

1.9.3 and since multiplay is supported

Expected result

Send exact amount of money

Actual result

Game send a lot of money

Steps to reproduce

  1. Set currency KRW/JPY and so on, which of its exchange rate in GBP is very high (eg. 1GBP = 1850KRW)
  2. Send A LOT OF money to other company, such as 2147483648(UINT_MAX+1)
    image
  3. It overflows so that the game send lots of money
    image
    First line shows that the game send £2,147,483,648 exactly when I set in GBP.
    Second and third lines show that it overflows when I set JPY/KRW.
    All of three results come from the same value, 2147483648

Note that this overflow issue also occurs when I set in GBP and send A LOT OF money, such as 21474836480. (Game send £0)

@andythenorth andythenorth changed the title Overflow issue when sending money in multiplay Overflow issue when sending money in multiplayer Oct 22, 2019
JGRennison added a commit to JGRennison/OpenTTD-patches that referenced this issue Nov 16, 2019
@TrueBrain TrueBrain added this to the 1.11.0 milestone Jan 5, 2021
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 a pull request may close this issue.

2 participants