Removing unneeded null chars from sprintfs