[gs-code-review] rev 7674 - trunk/gs/src

SaGS sags5495 at gmail.com
Sun Feb 4 07:50:18 PST 2007


----- Original Message -----
From: "Leonardo" <leonardo at artifex.com>
To: "SaGS" <sags5495 at hotmail.com>; "gs-code-review" <gs-code-review at ghostscript.com>
Sent: Sunday, 04 February 2007 12:28
Subject: Re: [gs-code-review] Re: [gs-cvs] rev 7674 - trunk/gs/src


> _vsnprintf appears working with MSVC8, so I'll commit it soon.
>
> Why do you need buffer[n - 1] = 0 ?
> _vsnprintf looks doing that.

The docs say:

    "If the number of characters to write exceeds count, then count
    characters are written and –1 is returned."

That means no trailing '\0'. "buffer[count - 1] = 0" fixes this.

> ...



More information about the gs-code-review mailing list