If they wanted to give me a $100 bill, it is fully within their rights to do so. If I really entered $50, then I certainly did not authorize my bank to debit my account for $100.
They might have some legal grounds depending on the local legislation to request the $50 back due to their fault/mistake, but I can dispute that and the result is far from certain.
It's unfortunate you ignore it. My original question was precisely a moral question. :)
But if we're debating if the 'taker' should be punished (as in the original post), then the legal question applies. It may be wrong to abuse the opportunity, depending on the circumstances, but it would be far more wrong to put the person in jail for doing something the vendor implicitly seemed to allow.
See, for example, a family who were jailed for exactly this: http://www.guardian.co.uk/uk/2003/jan/16/rebeccaallison2
Citations welcome to this being different in other countries.