Fix a bug in the git_oid_to_string() function
commit552e23ba566d975b4dd48163b91021892504f021
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>
Wed, 2 Jun 2010 18:16:28 +0000 (2 19:16 +0100)
committerRamsay Jones <ramsay@ramsay1.demon.co.uk>
Mon, 7 Jun 2010 18:44:04 +0000 (7 19:44 +0100)
treee044baa468a1c74f9f9da36805445f6888358b49
parentf29249340c11b069e46b70fc145c1d7fbe213b94
Fix a bug in the git_oid_to_string() function

When git_oid_to_string() was passed a buffer size larger than
GIT_OID_HEXSZ+1, the function placed the c-string NUL char at
the wrong position. Fix the code to place the NUL at the end
of the (possibly truncated) oid string.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
src/oid.c
tests/t0101-oid.c