Hi Przemek,
        
Ok, Thanks to you and sorry for my bad English.

Best regards,
Xavi

Przemyslaw Czerpak escribió:
On Wed, 28 Jan 2009, Xavi wrote:

Hi Xavi,

Yes you're right. But sorry for my bad English.

Not worse then mine.
Now I understand that you are talking about integer value returned
by snprintf() not about the buffer contents. Sorry my fault.

http://www.opengroup.org/onlinepubs/009695399/functions/fprintf.html
"Return value: Upon successful completion, the snprintf() function shall return the number of bytes that would be written to s had n been sufficiently large *excluding the terminating null byte* ."
Now hb_snprintf_c() include in the return value "size" the terminating
null byte, you know?.

Yes sure, it's a bug and should be fixed.
instead of:
   return ( int ) size
we should have:
   return ( int ) ( size - 1 );

Many thanks for noticing it. I'll fix it in a while.

best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour


_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to