[freetds] FW: dblib patch

Ian Ashley iashley at picdar.com
Fri Jul 1 12:12:36 EDT 2005


Dear all,

> last line should be
> 
> return t - str + 1;
> 
> a mix of the two
> 
> for (t = istr + ilen; --t > istr && *t == ' '; )
>   *t = '\0';
> return t - str + 1;
> 
> About char/varchar is the same, server fill needed spaces if necessary.
> 
> freddy77

Shouldn¹t it be

for (t = istr + ilen; --t >= istr && *t == ' '; )
   *t = '\0';
return t - str + 1;

to cope the string being all spaces. I assume the return value is meant to
be the number of characters excluding the '\0'

Ian


More information about the FreeTDS mailing list