nulleric
/Fix-a-Fork
/amendments
/21
Fix logic for checking file ext len. Thanks Steve!
eric made amendment 21 about 1 year ago
--- main.c Thu Nov 9 16:10:45 2023
+++ main.c Thu Nov 9 16:40:15 2023
@@ -119,7 +119,7 @@ OSErr openFile(unsigned char *fName, short fRefNum, sh
for(i = fName[0]; i > 0; i--)
if(fName[i] == '.')
break;
- if(i != fName[0] && i <= 5) // There is an extension
+ if(i != fName[0] && (fName[0] - i) <= 5) // There is an extension
{
i = i + 1; // increment to avoid '.'
// Parse file extension