Switched to snprintf_s (on Windows) for added safety.