Both the problems from the other thread seemed to be on subtracts, and more importantly subtracts with "bad" answers (-1, and 0). So check to see what happens when you try to borrow a number that you don't actually have (I didn't actually trace through your code, but that's my guess).

How do you intend to handle negative numbers?