summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2004-05-27 17:54:40 +0400
committerdlenev@brandersnatch.localdomain <>2004-05-27 17:54:40 +0400
commit03b705ff4408f011eebdadffeb249e9ef533c3ea (patch)
tree0a3ac45d591f6d81591a9b4ec19f2d45e2c29570 /strings/my_vsnprintf.c
parentfc85c80b88c0717684184f22a91f8b027a8f8559 (diff)
downloadmariadb-git-03b705ff4408f011eebdadffeb249e9ef533c3ea.tar.gz
Made my_snprintf() behavior snprintf() compatible when printing %x arguments (it should
produce hex digits in lower case). (fixed version) Replaced _dig_vec array with two _dig_vec_upper/_dig_vec_lower arrays. Added extra argument to int2str function which controls case of digits you get. Replaced lot of invocations of int2str for decimal radix with more optimized int10_to_str() function. Removed unused my_itoa/my_ltoa functions.
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r--strings/my_vsnprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index d9d80263d31..dc03c130dcd 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -118,7 +118,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
if (*fmt== 'u')
store_end= int10_to_str(larg, store_start, 10);
else
- store_end= int2str(larg, store_start, 16);
+ store_end= int2str(larg, store_start, 16, 0);
if ((res_length= (uint) (store_end - store_start)) > to_length)
break; /* num doesn't fit in output */
/* If %#d syntax was used, we have to pre-zero/pre-space the string */