What this code says is "ignore anything after a hash ... unless we're compiling with 
Microsoft C, in which case only ignore lines which start with a hash".  Surely this 
isn't intended.  Curt checked in the change last May, but almost certainly didn't 
invent it.

My tentative guess would be that MSVC users were bitten by the memory over-run bug in 
the same file, which was fixed only last month (thanks to Melchior) and that this was 
sort of a crude work-around for it.  Not sure, though.

Unless someone has a valid reason for it, I suggest the "#ifdef _MSC_VER ... #else" 
section be removed.


TimezoneContainer::TimezoneContainer(const char *filename)
{
...
            fgets(buffer, 256, infile);
...
#ifdef _MSC_VER
            if( buffer[0] == '#' )
               continue;
#else
            for (char *p = buffer; *p; p++) {
                if (*p == '#') {
                    *p = 0;
                    break;
                }
            }
#endif
            if (buffer[0]) {
...
}


- Julian

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to