From 27eed024ffbccfed9f9d34a1911bbbb96e67d6ef Mon Sep 17 00:00:00 2001 From: Liu Chao Date: Sun, 23 Feb 2014 18:05:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=82=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/font/textstyle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/font/textstyle.c b/src/font/textstyle.c index 26dbabdf..24cdf8ad 100755 --- a/src/font/textstyle.c +++ b/src/font/textstyle.c @@ -150,7 +150,7 @@ LCUI_API int StyleTag_Add( LCUI_Queue *tags, StyleTag_Data *data ) if( Queue_Add( tags, data ) ) { return 0; } - return 0; + return -1; } /** 获取当前的样式数据 */ @@ -161,7 +161,7 @@ LCUI_API LCUI_TextStyle* StyleTag_GetCurrentStyle( LCUI_Queue *tags ) LCUI_TextStyle *style_data; int i, total, equal = 0, flags[MAX_TAG_NUM]; - style_data = malloc (sizeof(LCUI_TextStyle)); + style_data = (LCUI_TextStyle*)malloc( sizeof(LCUI_TextStyle) ); TextStyle_Init( style_data ); memset( flags, 0, sizeof(flags) ); @@ -173,7 +173,7 @@ LCUI_API LCUI_TextStyle* StyleTag_GetCurrentStyle( LCUI_Queue *tags ) /* 从样式数据队列中获取字体样式数据 */ for(equal=0,i=total-1; i>=0; --i) { - tag_data = Queue_Get( tags, i ); + tag_data = (StyleTag_Data*)Queue_Get( tags, i ); DEBUG_MSG("tag id: %d\n", tag_data->tag); switch( tag_data->tag ) { case TAG_ID_COLOR: