That's right, seemed nicer to terminate the string and update the size, but it's makes no difference, the buffer should be discarded. 

fixed