Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 8, 2026

  1. No modern systems lack snprintf()

  2. If there actually exist any such systems, they get to manage without floating point output.

1. No modern systems lack snprintf()

2. If there actually exist any such systems, they get to manage without
   floating point output.
@bagder bagder marked this pull request as ready for review January 8, 2026 08:14
@bagder bagder requested a review from Copilot January 8, 2026 08:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the unsafe sprintf fallback for floating-point formatting in systems that lack snprintf() support. The rationale is that no modern systems lack snprintf(), and if any such legacy systems exist, they will simply not support floating-point output rather than using the unsafe sprintf function.

Key Changes

  • Removed the old sprintf fallback that was used for float/double formatting when HAVE_SNPRINTF is not defined
  • Replaced it with code that sets an empty string, effectively disabling float/double output on such systems
  • Added a comment explaining that float and double outputs do not work without snprintf support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 7de3551 Jan 8, 2026
@bagder bagder deleted the bagder/mprintf-no-snprintf branch January 8, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant