summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-01-31 09:48:19 +0100
committerSergei Golubchik <sergii@pisem.net>2013-01-31 09:48:19 +0100
commitab83952f293ea46c00e421c81b81a394c9cae2b4 (patch)
tree6a3e995bd1330828a0e988d896bca218863fc74c /strings
parent055b62f404ee0a0463ee8ff98a0e24c083b95f1d (diff)
parent5267af5e9e5e601d4f4b1ef40730da1e36d38d9d (diff)
downloadmariadb-git-ab83952f293ea46c00e421c81b81a394c9cae2b4.tar.gz
10.0-base merge
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-ucs2.c3
-rw-r--r--strings/my_vsnprintf.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 52eaece5528..6ebbae8fb5a 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -46,9 +46,10 @@
#define LFACTOR1 ULL(10000000000)
#define LFACTOR2 ULL(100000000000)
+#if defined(HAVE_CHARSET_utf32) || defined(HAVE_CHARSET_mb2)
static unsigned long lfactor[9]=
{ 1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 100000000L };
-
+#endif
#ifdef HAVE_CHARSET_mb2_or_mb4
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index 408931ee930..2073d5a93d9 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -685,7 +685,7 @@ size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n,
}
/* We come here on '%%', unknown code or too long parameter */
- if (to == end)
+ if (to >= end)
break;
*to++='%'; /* % used as % or unknown code */
}