snprintf always adds terminating 0