Bug#456559: goplay: popcon results screwed up

Peter De Wachter pdewacht at gmail.com
Mon Dec 17 21:54:54 UTC 2007


Ok, I found the bugs. I've applied these patches to svn:

--- pkgbrowser.cpp      (revision 4990)
+++ pkgbrowser.cpp      (working copy)
@@ -304,7 +304,7 @@
        }
 
        int last_w = 0;
-       if (*str=='%' && ('0'<*str+1) && (*str+1)<'9')
+       if (*str=='%' && '0'<=str[1] && str[1]<='9')
        {
                char *after;
                /* int percent = */ strtol(str+1, &after, 10);
@@ -404,7 +404,7 @@
                if (!active_r()) lcol = fl_inactive(lcol);
                fl_color(lcol);
 
-               if (*str=='%' && ('0'<*str+1) && (*str+1)<'9')
+               if (*str=='%' && '0'<=str[1] && str[1]<='9')
                {
                        char *after;
                        int percent = strtol(str+1, &after, 10);
--- goplay.cpp	(revision 4990)
+++ goplay.cpp	(working copy)
@@ -242,7 +242,7 @@
 
 		string desc = string(fmtstr) + rec.package() + "\t" + 
 			string(fmtstr) + rec.shortDescription();
-		if (engine.popcon().hasData())
+		if (engine.popcon().hasData() && i->popcon)
 		{
 			desc += "\t" + string(fmtstr);
 			char stars[16];





More information about the Pkg-games-devel mailing list