On Mar 25, 2009, at 2:23 AM, Joerg Mayer wrote:
The problem seems to be that only the last two characters are shown
instead
of the full length string. A problem with g_snprintf may be that it
doesn't like to use a rhs argument as its lhs result.
Not that you should be doing that anyway.
What they're doing is attempting to append to a string buffer.
There's a somewhat ugly idiom, used in a number of places, to do that
with g_snprintf(); it's probably faster, as you don't have to copy the
string on top of itself.
Then again, if they want capital letters for hex digits, they could
just use bytes_to_str() in most if not all of those cases, and if they
want lower-case letters, they could use bytestring_to_str(). (Yes,
having all those routines for this is overkill.)