Skip to content

fopen/ti_Open does not support rb+ and etc #724

Description

@ZERICO2005

fopen currently wraps ti_Open. Currently, ti_Open supports r, a, w, r+, a+, and w+.

I am not exactly sure, but I think ti_Open correctly implements rb, ab, and wb since I believe they would behave no different compared to r, a, and w on this platform. However, it only checks if (str[1] == '+'), so rb+ would be treated as r instead of r+

One fix for this is to modify the fileioc logic to check if (str[2] == '+') so rb+ would be interpreted as r+

https://en.cppreference.com/w/c/io/fopen

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions