From 6f8cef248e1467595a932707eb9a9c53af2e8839 Mon Sep 17 00:00:00 2001 From: oroborus Date: Fri, 30 May 2008 17:03:33 +0000 Subject: - opravene memory leaky pomocou vlagrindu - sietovy protokol je navrhnuty tal aby client odsiselal info o tom, ze obdrzal spravu git-svn-id: http://opensvn.csie.org/tuxanci_ng@57 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/screen_analyze.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/screen_analyze.c') 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); } -- cgit v1.2.3