Guys,

I think that I found a bug in the qlib_h include file used by C68.   
Here are the details:

In the 'qdirect' structure, the member 'd_name' is defined as:
        char d_name[36];

This works as long as the directory/file name is 35 or fewer  
characters and holds a properly terminated C string (terminates with  
a '0').  However, if the total name length is actually 36 characters,  
then there is no termination.  As far as I can tell the structure  
does properly hold everything and isn't corrupt, just no termination  
in that one case.

This might explain why in a few problems with long file names, I see  
handling problems but not in others (compiled in C68 versus assembly  
or compiled SBASIC for example?).

If I am correct this structure should define it as:

        char d_name[37];

to allow room for the termination character of a C string.

Jim

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to