From a14d2fbadf4a3fa09771ad3ecedcc72add85d6f1 Mon Sep 17 00:00:00 2001 From: frese Date: Sun, 17 Mar 2002 15:51:21 +0000 Subject: [PATCH] - fixed a bug in text-width. --- c/xlib/text.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c/xlib/text.c b/c/xlib/text.c index f6303d1..88db1bc 100644 --- a/c/xlib/text.c +++ b/c/xlib/text.c @@ -13,10 +13,10 @@ extern XDrawText(), XDrawText16(); s48_value scx_Text_Width(s48_value Xfontstruct, s48_value text, s48_value format){ - char* s; - XChar2b* s2; - XFontStruct* font = SCX_EXTRACT_FONTSTRUCT(Xfontstruct); int len = (int)S48_VECTOR_LENGTH(text), i, tmp; + char s[len]; + XChar2b s2[len]; + XFontStruct* font = SCX_EXTRACT_FONTSTRUCT(Xfontstruct); if (s48_extract_integer(format) == 1){ for (i = 0; i < len; i++){ tmp = (int)s48_extract_integer(S48_VECTOR_REF(text, i)); @@ -161,7 +161,7 @@ s48_value scx_Draw_Poly_Text (s48_value Xdisplay, s48_value Xdrawable, } else { s48_value fontspec = S48_VECTOR_REF(text, i); s48_value font = S48_CAR(fontspec); - item[set].font = S48_SYMBOL_P(font) ? None : SCX_EXTRACT_FONT(font); + item[set].font = SCX_EXTRACT_FONT(font); item[set].delta = s48_extract_integer(S48_CDR(fontspec)); } }