fix DEBUG decimal() of negative number
This commit is contained in:
parent
ad1c0f578e
commit
be96c28b77
@ -62,7 +62,7 @@ decimal(int x, char *ptr, int n)
|
||||
{
|
||||
if (x < 0) {
|
||||
x = -x;
|
||||
*ptr = '-'; ++n;
|
||||
*ptr[n++] = '-';
|
||||
}
|
||||
return unsimal(x, ptr, n);
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ decimal(int x, char *ptr, int n)
|
||||
{
|
||||
if (x < 0) {
|
||||
x = -x;
|
||||
*ptr = '-'; ++n;
|
||||
*ptr[n++] = '-';
|
||||
}
|
||||
return unsimal(x, ptr, n);
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ decimal(int x, char *ptr, int n)
|
||||
{
|
||||
if (x < 0) {
|
||||
x = -x;
|
||||
*ptr = '-'; ++n;
|
||||
*ptr[n++] = '-';
|
||||
}
|
||||
return unsimal(x, ptr, n);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user