Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tinystdio: ungetc decrements file position indicator correctly
According to the ISO/IEC_9899_1999, section: J.5.16 it is mentioned that there is a file position indicator that is decremented by each call of the ungetc function. The value of the file position indicator was not directed to the right position, this issue is now handled in the ftell function so the file indicator is placed correctly after the function ungetc is called. An "if" condition is added which checks on the value of unget and if it is not equal zero then ungetc function is called so the indicator will be decremented. Signed-off-by: Hana Ashour <[email protected]>
- Loading branch information