in reply to Pop quiz: find the bug
Update: black on black is a good one. So here comes:
An assignment returns the variable being assigned to as an lvalue, which the following && evaluates to its value. Therefor, ($something += $amt) will return 0 if that is $something's new value, causing the following && to fall through and miss the last. As a result, at least one too many variables get updated within the same switch statement - potentially even all of them. |
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re(2): Pop quiz: find the bug
by FoxtrotUniform (Prior) on Jul 04, 2002 at 02:28 UTC |