mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
fixing 2 more fualt in msvcrt *printf api
svn path=/trunk/; revision=22247
This commit is contained in:
parent
21baa4ddb6
commit
7894ff05b8
|
@ -115,12 +115,12 @@ number(char * buf, char * end, long long num, int base, int size, int precision,
|
|||
size--;
|
||||
}
|
||||
}
|
||||
|
||||
if (type & SPECIAL) {
|
||||
if (base == 16)
|
||||
size -= 2;
|
||||
else if (base == 8)
|
||||
size--;
|
||||
}
|
||||
|
||||
}
|
||||
i = 0;
|
||||
if ((num == 0) && (precision !=0))
|
||||
tmp[i++] = '0';
|
||||
|
@ -141,12 +141,9 @@ number(char * buf, char * end, long long num, int base, int size, int precision,
|
|||
*buf = sign;
|
||||
++buf;
|
||||
}
|
||||
|
||||
if (type & SPECIAL) {
|
||||
if (base==8) {
|
||||
if (buf <= end)
|
||||
*buf = '0';
|
||||
++buf;
|
||||
} else if (base==16) {
|
||||
if (base==16) {
|
||||
if (buf <= end)
|
||||
*buf = '0';
|
||||
++buf;
|
||||
|
@ -155,6 +152,7 @@ number(char * buf, char * end, long long num, int base, int size, int precision,
|
|||
++buf;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(type & LEFT)) {
|
||||
while (size-- > 0) {
|
||||
if (buf <= end)
|
||||
|
@ -177,6 +175,7 @@ number(char * buf, char * end, long long num, int base, int size, int precision,
|
|||
*buf = ' ';
|
||||
++buf;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,12 +115,11 @@ number(wchar_t * buf, wchar_t * end, long long num, int base, int size, int prec
|
|||
size--;
|
||||
}
|
||||
}
|
||||
|
||||
if (type & SPECIAL) {
|
||||
if (base == 16)
|
||||
size -= 2;
|
||||
else if (base == 8)
|
||||
size--;
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
if ((num == 0) && (precision !=0))
|
||||
tmp[i++] = L'0';
|
||||
|
@ -141,12 +140,9 @@ number(wchar_t * buf, wchar_t * end, long long num, int base, int size, int prec
|
|||
*buf = sign;
|
||||
++buf;
|
||||
}
|
||||
|
||||
if (type & SPECIAL) {
|
||||
if (base==8) {
|
||||
if (buf <= end)
|
||||
*buf = L'0';
|
||||
++buf;
|
||||
} else if (base==16) {
|
||||
if (base==16) {
|
||||
if (buf <= end)
|
||||
*buf = L'0';
|
||||
++buf;
|
||||
|
@ -177,6 +173,8 @@ number(wchar_t * buf, wchar_t * end, long long num, int base, int size, int prec
|
|||
*buf = L' ';
|
||||
++buf;
|
||||
}
|
||||
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue