I've changedNice thinking I was examining this line too but I haven't finished yet but to answerHow have you defined FSIZE_t? Could there be some kind of integer conversion going on inThe last bit of sorting needs to be in why oh why Lua is getting bonkers numbers when ever file:seek is used. when running on the old driver it all works just fine but the newlib layer is making a mess somewhere.
now that's I've gone in to "FIX" it I'm not sure what is going on.
I wonder if this is a bug in fatFS I did upgrade to fix another issue and that could have easily made a new one.?Code:
case SEEK_CUR: pos += f_tell(PT_FilePool[fd]); break; case SEEK_END: pos += f_size(PT_FilePool[fd]); break;
"...if the operand that has unsigned integer type has rank greater or equal to the rank of the type of the other operand, then the operand with signed integer type is converted to the type of the operand with unsigned integer type" (Implicit conversions)
typedef uint32_tDWORD;/* 32-bit unsigned integer */
typedef DWORD FSIZE_t;
typedef DWORD FSIZE_t;
to
typedef long FSIZE_t;
Since this matches what newlib makes off_t as and I can see normal looking seek numbers now! I'm still not seeing the system working correctly but this is a positive turn.
It might make sense to just make it off_t and include the correct header.
Statistics: Posted by DarkElvenAngel — Sat Dec 14, 2024 6:44 pm