Back on
August 15, 2010, someone generated 92233720368.54277039 bitcoins due to a bug. What was exactly the bug and how did they fix it? As far as I know, since a transaction is confirmed, it cannot be changed unless someone redoes the proof of work. The next block was mined 2 minutes after that one, so how did they do it?
The coinbase transaction that was moving all these bitcoins was hashed in order to be on the block so if they "simply changed" the 92233720368.54277039 to 50, it would return a completely different merkle root. Therefore, all the next blocks would be considered as invalid.