summaryrefslogtreecommitdiff
path: root/src/screen_analyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen_analyze.c')
-rw-r--r--src/screen_analyze.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/screen_analyze.c b/src/screen_analyze.c
index 6cb92a1..c223677 100644
--- a/src/screen_analyze.c
+++ b/src/screen_analyze.c
@@ -108,18 +108,24 @@ void addAnalyze(char *name, int score)
void endAnalyze()
{
- analyze_t *this;
int i;
for( i = 0 ; i < listAnalyze->count ; i++ )
{
+ analyze_t *this;
+ char *str;
+
this = (analyze_t *)(listAnalyze->list[i]);
addList(listWidgetLabelName, newWidgetLabel(this->name,
100, 200 + 20*i, WIDGET_LABEL_LEFT) );
- addList(listWidgetLabelScore, newWidgetLabel(getString(this->score),
+ str = getString(this->score);
+
+ addList(listWidgetLabelScore, newWidgetLabel(str,
WINDOW_SIZE_X - 100, 200 + 20*i, WIDGET_LABEL_RIGHT) );
+
+ free(str);
}
}
@@ -148,5 +154,7 @@ void quitScreenAnalyze()
destroyListItem(listWidgetLabelName, destroyWidgetLabel);
destroyListItem(listWidgetLabelScore, destroyWidgetLabel);
destroyListItem(listAnalyze, destroyAnalyze);
+
+ destroyWidgetButton(button_ok);
}