Comment 9 for bug 907761

Revision history for this message
Andrew Johnson (anj) wrote :

When long string support was added, the code was modified to 0-terminate all char arrays retrieved using the long string feature so that clients don't need to do that for themselves. With this design it makes little sense to fetch a single-element char array as the result will always be a single 0 character (i.e. an empty string), which is why it was rejecting those requests.

I don't mind changing the code so that a 1-char array fetch will succeed, but I don't want to remove the 0-termination functionality, so it should always return an empty string. I agree that the double subtraction is an error, which I will also fix.

I think that just leaves the issue of 0-terminating a char-array fetched from a DBF_STRING field, which I would like to see happen in order to make everything behave the same, so I'll regard that as the other bug here. I need to look at the code more closely to work out how best to implement it though.