Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinystdio: Fix vfprintf to not cap the max precision to print a hex format #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jul 15, 2024

  1. tinystdio: Fix vfprintf to not cap the max precision to print a hex f…

    …ormat
    
    printing using %.15a or %.15A formats give wrong results because dtox_engine
    handles max of 13 figures after decimal point in hex format.
    and it carried out that maximum precision to vfprintf function which max out the
    number of digits that get printed so if the format given is more than %.13a or
    %.13A it will still print 13 digits after the decimal place instead of just adding
    zeros after 13 digits which is not the correct behavior for vfprintf.
    
    After this change
    vfprintf handles more than 13 figures after the decimal point in hex format.
    
    Signed-off-by: Ahmed Shehab <[email protected]>
    A-Shehab committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    0b57881 View commit details
    Browse the repository at this point in the history
  2. Added testcase that tests %.15a & %.15A format specifiers in vfprintf

    issue found by running SuperTest by Solid Sands
    
    Signed-off-by: Ahmed Shehab <[email protected]>
    A-Shehab committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    3d24988 View commit details
    Browse the repository at this point in the history