summaryrefslogtreecommitdiff
path: root/sql/my_decimal.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-02-09 11:35:22 +0200
committerunknown <bell@sanja.is.com.ua>2005-02-09 11:35:22 +0200
commit8daa51887da31818fecfa9c157d29dae01816118 (patch)
treeefddb0ebd8ec9b101083b5d5690ce8ed839be169 /sql/my_decimal.cc
parentf4eef98e6eea90e7f5b54a7dcca8778867ecdc8f (diff)
downloadmariadb-git-8daa51887da31818fecfa9c157d29dae01816118.tar.gz
fixed C++ syntax in C code
fixed end of string detection in string->decimal conversion to avoid false alarm about some string part left unconverted (string can be not null terminated) ignore my_decimal.cc in libmysqld directory BitKeeper/etc/ignore: Added libmysqld/my_decimal.cc to the ignore list sql/my_decimal.cc: fixed end of string detection in string->decimal conversion to avoid false alarm about some string part left unconverted (string can be not null terminated) strings/decimal.c: fixed C++ syntax in C code
Diffstat (limited to 'sql/my_decimal.cc')
-rw-r--r--sql/my_decimal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc
index eafcd2eaaf3..027b33f1d1c 100644
--- a/sql/my_decimal.cc
+++ b/sql/my_decimal.cc
@@ -171,7 +171,7 @@ int str2my_decimal(uint mask, const char *from, uint length,
}
my_decimal_set_zero(decimal_value);
err= string2decimal((char *)from, (decimal *)decimal_value, &end);
- if (*end && !err)
+ if ((end-from) != length && !err)
err= E_DEC_TRUNCATED;
check_result(mask, err);
return err;