The boolean returned by .call/.send/.delegatecall is ignored. A failed transfer or call is treated as success, so accounting proceeds as if value moved when it did not.
(bool ok, ) = msg.sender.call{value: amount}("");
require(ok, "transfer failed");
balances[msg.sender] = 0;
Largest recorded losses in the same failure class — related, not the same bug:
The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0026 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.