From ceb75aed656fb84394811b07bbd68c74d62e9770 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Fri, 29 Jul 2005 14:39:11 +0500 Subject: Fix for bug #12173 (show create table crash) --- strings/decimal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'strings/decimal.c') diff --git a/strings/decimal.c b/strings/decimal.c index ca92ace92e1..4dc5fa91e0a 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -351,7 +351,8 @@ int decimal2string(decimal_t *from, char *to, int *to_len, buf0=&tmp; } - intg_len= fixed_precision ? fixed_intg : (intg ? intg : 1); + if (!(intg_len= fixed_precision ? fixed_intg : intg)) + intg_len= 1; frac_len= fixed_precision ? fixed_decimals : frac; len= from->sign + intg_len + test(frac) + frac_len; if (fixed_precision) -- cgit v1.2.1