summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-09 12:37:19 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-09 12:37:19 +0100
commitb5cbb9b03aeab5fd452f0014474163864f2d0c10 (patch)
tree4180eba21514426b5169f837d3a1e3dd2b3ca998 /lib
parentbff039d2e6d0d721447335311f83c5e9ff50d528 (diff)
downloadabrt-b5cbb9b03aeab5fd452f0014474163864f2d0c10.tar.gz
abrt-b5cbb9b03aeab5fd452f0014474163864f2d0c10.tar.xz
abrt-b5cbb9b03aeab5fd452f0014474163864f2d0c10.zip
reinstate code which returns rating 0 on empty backtraces
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/CCpp.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 4b73938c..bc10f114 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -210,7 +210,11 @@ int rate_backtrace(const std::string & backtrace)
}
}
- /* returning number of "stars" to show */
+ /* Bogus "backtrace" with zero frames? */
+ if (best_possible_rating == 0)
+ return 0;
+
+ /* Returning number of "stars" to show */
if (rating*10 >= best_possible_rating*8) /* >= 0.8 */
return 4;
if (rating*10 >= best_possible_rating*6)