Saturday, August 27, 2011

Dreaded whitespace

Results of trial run: Game crashed.

Details: Game consistently crashed right after getting to the cutscene where the Red Wings bomb Damycam. After poking around for a while, I finally discovered the problem; there was a trailing space after the filename for the Damycam command queue. Up to this point, my command queue parser hadn't been stripping white space from the end of commands, and hadn't been verifying file handles before trying to use them. I ran into the problem a few times before, but usually caught it pretty early.

Solution: Finally broke down and wrote code to strip whitespace from the ends of commands. Also, checking to see if we were actually able to open the target file of LoadGoals, and panicing if we can't.

No comments:

Post a Comment