Change how filenames for Mac OS attributes are declared.

This commit is contained in:
2021-04-14 04:26:51 +01:00
parent 4be893fe4a
commit e67e74c3d9
2 changed files with 8 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ void FileAttributes(const char* path)
for(i = 0; i < KNOWN_MAC_ATTRS; i++)
{
memset(str255, 0, 256);
memcpy(str255, mac_attrs[i].filename, strlen(mac_attrs[i].filename));
memcpy(str255, mac_attrs[i].filename, strlen((const char*)mac_attrs[i].filename));
memset(&finderInfo, 0, sizeof(FInfo));
rc = HCreate(refNum, dirId, str255, ostUnknown, ftGenericDocumentPC);

View File

@@ -33,13 +33,13 @@ Copyright (C) 2011-2021 Natalia Portillo
typedef struct
{
char* filename;
char contents[170];
char description[63];
uint16_t flags;
OSType type;
OSType creator;
Point location;
unsigned char* filename;
char contents[170];
char description[63];
uint16_t flags;
OSType type;
OSType creator;
Point location;
} mac_attr_tests_t;
#define KNOWN_MAC_ATTRS 33