Fix invalid buffer length in logFormat()
Fix invalid buffer length in logFormat()

When the buffer passed to vsnprintf() is too small it actually returns
length of the string, not how many characters have been written to the
buffer (which is limited by the buffer size).

So bound len by sizeof(buf) - 1 in logFormat().

tak2004/OpenGLVM,tak2004/OpenGLVM,tak2004/OpenGLVM