[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/libsvn_string svn_string.c

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-08-18 10:11:50 CEST

On Fri, Aug 18, 2000 at 01:10:34AM -0000, kfogel@tigris.org wrote:
>...
> +/* Chop NBYTES bytes off end of STR, but not more than STR->len. */
> +
> +void
> +svn_string_chop (svn_string_t *str, size_t nbytes)
> +{
> + if (nbytes > str->len)
> + str->len = 0;
> + else
> + str->len -= nbytes;
> +
> + if (str->len > 0)
> + str->data[0] = '\0';
> +}

That should probably be "str->data[str->len] = '\0'", right?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:07 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.