Memotech-Bill / pico-filesystem

Add support for STDIO on Files for the Raspberry Pi Pico using NEWLIB hooks
Other
16 stars 2 forks source link

FIX: reference pointing to char and not char* #7

Closed DarkElvenAngel closed 9 months ago

DarkElvenAngel commented 9 months ago

I found that I wasn't able to use stat on /dev I would get error 6.

The issue is that the rname is being set the the address of a char however this needs to be a char* otherwise the logic used in dev_stat will read past the end of the name since the pointer is incremented and in this case name is only a single byte.

With this change I can now properly stat /dev and see it is a directory.

Memotech-Bill commented 9 months ago

Thanks