Wednesday, May 25, 2005

Yay! Bug squashed!

With J peering over my shoulder, we found the bug. Yay! I had:

atm = e.atm;
// peb_dir = e.peb_dir;
// isbondT = e.isbondT;

Where I should have had:

// atm = e.atm;
peb_dir = e.peb_dir;
// isbondT = e.isbondT;

Sneaky little comment markers hiding on the wrong line!!!

Today's lesson in programming: always check your assumptions. We found this by printing a before and after save/restore version, to see whether the restore was working properly. It wasn't... peb_dir wasn't being set! (I had changed how I saved & restored atm and isbondT... they're arrays.)

No comments: