Commit 2eb08da9 authored by unknown's avatar unknown

my_snprintf_ucs2 bug fix

parent 99d5c167
...@@ -2382,7 +2382,7 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) ...@@ -2382,7 +2382,7 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap)
plen = (uint) strlen(par); plen = (uint) strlen(par);
if (left_len <= plen*2) if (left_len <= plen*2)
plen = left_len/2 - 1; plen = left_len/2 - 1;
dst=strnmov(dst,par,plen);
for ( ; plen ; plen--, dst++, par++) for ( ; plen ; plen--, dst++, par++)
{ {
dst[0]='\0'; dst[0]='\0';
...@@ -2400,9 +2400,9 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) ...@@ -2400,9 +2400,9 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap)
break; break;
iarg = va_arg(ap, int); iarg = va_arg(ap, int);
if (*fmt == 'd') if (*fmt == 'd')
dst=int10_to_str((long) iarg, nbuf, -10); int10_to_str((long) iarg, nbuf, -10);
else else
dst=int10_to_str((long) (uint) iarg,nbuf,10); int10_to_str((long) (uint) iarg,nbuf,10);
for (; pbuf[0]; pbuf++) for (; pbuf[0]; pbuf++)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment