jcs
/amend
/amendments
/156
util: getpath: fileName is a Pascal string, can't use strchr
jcs made amendment 156 9 months ago
--- util.c Mon Mar 25 16:07:59 2024
+++ util.c Sat Dec 6 20:53:59 2025
@@ -1063,7 +1063,7 @@ getpath(short vRefNum, Str255 fileName, Str255 *ret, b
char *tmpret = NULL, *tmp = NULL;
char *lastcolon;
- if (strchr((char *)fileName + 1, ':') != NULL) {
+ if (memchr((char *)fileName + 1, ':', fileName[0]) != NULL) {
/* already a full path */
memcpy(*ret, fileName, 256);
if (!include_file) {