Original code (sysdep.c) assumed a return code of -1 from vsnprintf()
was a truncation. Actually, it is an output error and the code still
tried to output it. A return of the buffer size or larger means it was
truncated. Changed the processing to handle return values properly.