Skip to Content.
Sympa Menu

freetds - Re: [freetds] FW: dblib patch

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Ian Ashley <iashley AT picdar.com>
  • To: FreeTDS Mailing List <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FW: dblib patch
  • Date: Fri, 01 Jul 2005 17:12:36 +0100

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




Archive powered by MHonArc 2.6.24.

Top of Page