fix printIntDetails for 0
This commit is contained in:
parent
4bbe08d8f5
commit
9b46b60b7a
@ -57,6 +57,9 @@ void printIntDetails(int integer, uint color, uint bgColor, int startX, int star
|
|||||||
if (integer < 0) {
|
if (integer < 0) {
|
||||||
printCharDetails('-', color, bgColor, x++, startY);
|
printCharDetails('-', color, bgColor, x++, startY);
|
||||||
}
|
}
|
||||||
|
if (integer == 0){
|
||||||
|
num[i++] = 0;
|
||||||
|
}
|
||||||
while (integer != 0) {
|
while (integer != 0) {
|
||||||
int digit = integer % 10;
|
int digit = integer % 10;
|
||||||
num[i++] = (digit > 0) ? digit : -digit;
|
num[i++] = (digit > 0) ? digit : -digit;
|
||||||
|
Loading…
Reference in New Issue
Block a user