diff options
-rw-r--r-- | dwmclock.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,7 +142,7 @@ int main(void) #ifdef POWER_NOW pcur = getnum(POWER_NOW); #elif defined(CURRENT_NOW) && defined(VOLTAGE_NOW) /* POWER_NOW */ - pcur = getnum(CURRENT_NOW) * getnum(VOLTAGE_NOW) / 1000000; + pcur = (long long)getnum(CURRENT_NOW) * (long long)getnum(VOLTAGE_NOW) / 1000000; #else /* POWER_NOW */ #error "Either POWER_NOW or CURRENT_NOW and VOLTAGE_NOW must be defined" #endif /* POWER_NOW*/ @@ -171,7 +171,7 @@ int main(void) if (pa < 0 || pb < 0) { snprintf(power, 6, "NOPOW"); } else if (pa < 0 || pa > 9999 || pb < 0 || pb > 9) { - snprintf(power, 6, "?????W"); + snprintf(power, 6, "????W"); } else if (pa > 99) { snprintf(power, 6, "%4lldW", pa); } else { |