Use `sprintf` instead of `snprintf` for compatibility