[Muine] time to string conversion fix



There's a unsigned to signed conversion problem in StringUtils.cs, so
time is not displayed correctly on my ppc linux system. The attached
patch fixes this problem.
 
-David
diff -ur ../muine.orig/src/StringUtils.cs ./src/StringUtils.cs
--- ../muine.orig/src/StringUtils.cs	2004-09-22 16:22:54.091734984 +0200
+++ ./src/StringUtils.cs	2004-09-22 16:23:16.363349184 +0200
@@ -24,11 +24,11 @@
 {
 	public static string SecondsToString (long time)
 	{
-		int h, m, s;
+		long h, m, s;
 
-		h = (int) (time / 3600);
-		m = (int) ((time % 3600) / 60);
-		s = (int) ((time % 3600) % 60);
+		h = (time / 3600);
+		m = ((time % 3600) / 60);
+		s = ((time % 3600) % 60);
 
 		if (h > 0) {
 			return h + ":" + m.ToString ("d2") + ":" + s.ToString ("d2");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]