opentibiabr / canary

Canary Server 13.x for OpenTibia community.
https://docs.opentibiabr.com/
GNU General Public License v2.0
374 stars 617 forks source link

[Infinite Money Bug on Market] #520

Closed ThiagoNBCoding closed 2 years ago

ThiagoNBCoding commented 2 years ago

Priority

High

Area

What happened?

On the c++ function responsible for creating a market offer, if a number goes over a certain value(I assume it's 2^32, given the variable is set as 2^32 for price, and 2^16 for amount - example, try buying 64000 tibia coins for 100000 gold each, create the offer, then cancel it), the offer creation removes less than the actual amount from the player's bank, when canceling the offer, they then get more money than then paid.

I fixed the issue by changing the variables to uint_64t, but anyway, on the source here this might still be a problem.

What OS are you seeing the problem on?

Linux

Code of Conduct

guispiller commented 2 years ago

Thanks for your report, this was very important for us! You don't need to close it, it will be automatically closed when the PR gets merged.