File: uptime-display.patch

package info (click to toggle)
wmcpu 1.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 200 kB
  • sloc: ansic: 1,284; makefile: 67
file content (20 lines) | stat: -rw-r--r-- 595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Author: Pedro Gimeno <parigalo@formauri.es>
Description: Fix uptime display if more than 99 days
Last-Update: 2012-04-23
Bug-Debian: https://bugs.debian.org/670152
Forwarded: Yes

--- a/wmcpu.c
+++ b/wmcpu.c
@@ -310,9 +310,9 @@ void wmcpu_routine(void)
 			copy_xpm_area(63, 66, 3, 9, 25, 48);
 			tempy = days % 10;
 			copy_xpm_area(3 + (tempy * 6), 66, 6, 9, 18, 48);
-			tempy = days / 10;
+			tempy = (days / 10) % 10;
 			copy_xpm_area(3 + (tempy * 6), 66, 6, 9, 12, 48);
-			tempy = days / 100;
+			tempy = (days / 100) % 10;
 			copy_xpm_area(3 + (tempy * 6), 66, 6, 9, 6, 48);
 		}
 	}