Very small fix to formatting integers.
This commit is contained in:
parent
a02d286ad5
commit
6d2cf313cb
|
@ -252,6 +252,14 @@ struct cons_pointer integer_to_string( struct cons_pointer int_pointer,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stringp(result) && pointer2cell(result).payload.string.character == L',') {
|
||||||
|
/* if the number of digits in the string is divisible by 3, there will be
|
||||||
|
* an unwanted comma on the front. */
|
||||||
|
struct cons_pointer tmp = result;
|
||||||
|
result = pointer2cell(result).payload.string.cdr;
|
||||||
|
dec_ref(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
if ( is_negative ) {
|
if ( is_negative ) {
|
||||||
result = make_string( L'-', result );
|
result = make_string( L'-', result );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue