The global variables tagsText and commentText were used to pass
a string obtained from a widget (and thus not malloc'ed), which
caused a crash when the GenericReadout tried to use those variables
for the new value. Fixed by using GenericReadout (which does malloc)
to read out the text,in stead of GetWidgetText.
void SaveChanges(int n)
{
- GetWidgetText(¤tOption[0], &commentText);
+ GenericReadout(0);
ReplaceComment(commentIndex, commentText);
}
void changeTags(int n)
{
- GetWidgetText(¤tOption[1], &tagsText);
+ GenericReadout(1);
if(bookUp) SaveToBook(tagsText); else
ReplaceTags(tagsText, &gameInfo);
}