File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # put the engine folder crashes in OSX 10.6
Original file line number Diff line number Diff line change @@ -84,6 +84,15 @@ char *path2utf(char *path);
8484
8585void MCS_setfiletype (const char *newpath);
8686
87+ // PM-2014-08-08: [[ Bug 13132 ]] OSX 10.6 does not contain an implementation for strndup so use our own regardless of the OSX version
88+ static char *my_strndup (const char *s, uint32_t l)
89+ {
90+ char *r;
91+ r = new char [l + 1 ];
92+ strncpy (r, s, l);
93+ r[l] = ' \0 ' ;
94+ return r;
95+ }
8796
8897/* *******************************************************************/
8998/* File Handling */
@@ -2047,7 +2056,7 @@ void MCS_getspecialfolder(MCExecPoint &p_context)
20472056 {
20482057 extern char *MCcmd;
20492058 char * t_folder;
2050- t_folder_path = strndup (MCcmd, strrchr (MCcmd, ' /' ) - MCcmd);
2059+ t_folder_path = my_strndup (MCcmd, strrchr (MCcmd, ' /' ) - MCcmd);
20512060
20522061 t_mac_folder = 0 ;
20532062 t_found_folder = true ;
You can’t perform that action at this time.
0 commit comments