2 ms·
* while you are displaying a tree keep track of the items you already displayed so you can detect a cycle
by scotty79 14y ago
* while you are displaying a tree keep track of the items you already displayed so you can detect a cycle
- sukuriant 14y agoI think the assumption there was that it was safe, since the code disallowed this from happening, naturally.
- scotty79 14y agoAssumption is the mother of all screw ups. Even if you think that the code that creates and modifies your data will not put it in some undesired state, the code that uses this data should assume that the data may be in all undesired states you can dream up and should do its best not to do something seriously bad when that happens (like landing in endless loop/recursion or executing possibly user provided strings).