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:fixing hexadecimal string conversion #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 7, 2024

  1. tinystdio:fixing hexadecimal string conversion

    added an extra else if condition to make sure that the exp is calulated
    correctly when the exp_match is 'e'
    
    The hexadecimal string with decimal points was handled in a wrong way when it
    was passed to these functions strod(), strtof() and strtold().
    The exp variable was only handled when the exp_match is equal to 'p' or 'e',
    so when any other hexadecimal string with no e or p format specifiers is passed,
    wrong results returned. therefore the change was made so the exp is handled
    correctly in all cases not only when p or e are passed as format specifiers.
    
    added a new testing value in the file test-strtod.c to test the mentioned case above.
    
    Signed-off-by: Hana Ashour <[email protected]>
    HanaMAshour committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    15c6eba View commit details
    Browse the repository at this point in the history