Commit 9b46b60b authored by Mathieu Maret's avatar Mathieu Maret

fix printIntDetails for 0

parent 4bbe08d8
......@@ -57,6 +57,9 @@ void printIntDetails(int integer, uint color, uint bgColor, int startX, int star
if (integer < 0) {
printCharDetails('-', color, bgColor, x++, startY);
}
if (integer == 0){
num[i++] = 0;
}
while (integer != 0) {
int digit = integer % 10;
num[i++] = (digit > 0) ? digit : -digit;
......
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