roken: fix append_string "%.s" non-nul termination
commit0acef7729f664cfe591ff86964651bb0bbf5d6b0
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 20 May 2015 14:27:12 +0000 (20 10:27 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 20 May 2015 14:27:12 +0000 (20 10:27 -0400)
tree30d3d4de8b531fd05374652433dbf9a9ff8739f9
parente51c2126e634602cb6d013a825e13e816282ab4a
roken: fix append_string "%.s" non-nul termination

It should be possible to pass a format string of "%.s" to permit
a non-nul terminated string to be used as input.  The test of remaining
precision and the test for NUL needs to be reversed to permit this
behavior to function correctly.

Change-Id: I200f9c2886419dc4c3870f5f44bc10e81245f56c
lib/roken/snprintf.c