This repository was archived by the owner on Aug 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -761,7 +761,11 @@ static void do_iphone_font_create(void *p_env)
761761 if (t_base_font != nil )
762762 sprintf (t_base_name, " %s" , [[t_base_font fontName ] cStringUsingEncoding: NSMacOSRomanStringEncoding]);
763763 else
764- /* UNCHECKED */ MCStringConvertToCString (*p_name, (char *&)t_base_name);
764+ {
765+ MCAutoPointer<char > t_name;
766+ /* UNCHECKED */ MCStringConvertToCString (*p_name, &t_name);
767+ strcpy (t_base_name, *t_name);
768+ }
765769
766770 if (p_bold && p_italic)
767771 {
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ static void dopopupanswerdialog_postwait(void *p_context)
154154 return -1 ;
155155
156156 popupanswerdialog_t ctxt;
157+ /* UNCHECKED */ MCMemoryAllocate (p_button_count * sizeof (MCStringRef), ctxt . buttons);
157158 ctxt . buttons = p_buttons;
158159 for (uindex_t i = 0 ; i < p_button_count; i++)
159160 ctxt . buttons[i] = MCValueRetain (p_buttons[i]);
@@ -172,6 +173,7 @@ static void dopopupanswerdialog_postwait(void *p_context)
172173
173174 for (uindex_t i = 0 ; i < p_button_count; i++)
174175 MCValueRelease (ctxt . buttons[i]);
176+ /* UNCHECKED */ MCMemoryDeallocate (ctxt . buttons);
175177 MCValueRelease (ctxt . title);
176178 MCValueRelease (ctxt . message);
177179 return ctxt . result;
You can’t perform that action at this time.
0 commit comments