_sntprintf is nonportable; use sprintf instead