tgsi: correct handling of return value from util_vsnprintf
authorKeith Whitwell <keithw@vmware.com>
Fri, 26 Jun 2009 12:43:10 +0000 (13:43 +0100)
committerKeith Whitwell <keithw@vmware.com>
Fri, 26 Jun 2009 12:45:34 +0000 (13:45 +0100)
commit3e94521912ca75bb14093053bf1cd1001e79cd1b
tree0e216f6bcf130c5c68723dd547685b6dc71564b7
parentc9f8c400ab23ce86448d6b3f8e292e5d5a170a67
tgsi: correct handling of return value from util_vsnprintf

We were failing to deal with:
  - vsnprintf returns negative value on error.
  - vsnprintf returns the number of chars that *would* have been
    written on truncation.
src/gallium/auxiliary/tgsi/tgsi_dump.c