findFirstFile/findNextFile Bug!
by Kyle Carter · in General Discussion · 04/13/2002 (8:30 pm) · 0 replies
I was playing around, and found a most interesting bug. This is probably not a huge bug (see my explanation below), but it shouldn't break TGE.
I'm doing extensive findFirstFile/findNextFile stuff... I'm working on replacing the current root main.cs with a more generic solution. And I found that if you do a findNextFile, then run the RW startup sequence, then do another findNextFile, TGE dies with a fatal error. I assume that somewhere in the RW load code, something interacts with findNextFile's context information in such a way as to cause a crash later on.
I fixed the problem by loading all the file names I'm interested in into an array, then processing that array.
I'm doing extensive findFirstFile/findNextFile stuff... I'm working on replacing the current root main.cs with a more generic solution. And I found that if you do a findNextFile, then run the RW startup sequence, then do another findNextFile, TGE dies with a fatal error. I assume that somewhere in the RW load code, something interacts with findNextFile's context information in such a way as to cause a crash later on.
I fixed the problem by loading all the file names I'm interested in into an array, then processing that array.