Forum

Please or Register to create posts and topics.

14,000 uncs lost to a bug

As the forum title says, I lost 14,700 uncs due to a unique bug that I have never known to happen before.

Basically, I was wanting to buy 3 pieces of glass, so I find glass in the shop, and type in /buy 22785.  I pressed enter before realizing that this would attempt to buy the entire reserve of glass.  I saw that it would have fit in my inventory, and assumed that it canceled the trade.  I then proceeded to buy 3 glass from the same person.  Then I look at the transaction information, and see that it is telling me that I only have 10,000 uncs left.  I thought this was a bug, but when I did /money, it also confirmed and told me that I had 10,000 uncs left.  Has this bug happened to anyone else before? In the past, I have accidentally tried to buyout everything in a certain ID with the same message that my inventory is full, and it has never taken away my uncs before.  Is there anyway to fix this?

Also here is a picture of the incident in the chat: [IMG]http://i.imgur.com/qlW7A.jpg[/IMG]

Wait, did you get the glass? Because Uncovery and Azkedar recently did an update to the shop and deposit. Now you don't get the error saying you don't have enough spaces for what you are trying to buy/withdraw. It will now buy/withdraw as much as your inventory can hold. If you didn't receive the item then it must've been a bug with that.

No kidcodiwise, I was just about to put that in the post.  I didn't get any glass from that first transaction.

Sorry about that. I can confirm this was a bug which I introduced in the large batch of changes on Dec. 6.

@Uncovery: The bug was on line 672 of shop.inc.php, I was calling "check_space" with the wrong arguments, causing the buy to proceed even though there was not enough space. A second call when the items are moved (after taking the money) from inside inventory.php correctly detected this and stopped the transaction, but only after money was moved. HoldenGs should be credited for the 14711.2 uncs he was charged in error.

I have an made an updated copy of the offending file with the bug fix in the usual location.

Thank you, Azkeder.  I'm glad to know that this bug will be fixed.

Ok I refunded you the money now.