summaryrefslogtreecommitdiff
path: root/cachegrind
diff options
context:
space:
mode:
authorsewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2005-11-01 02:20:19 +0000
committersewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2005-11-01 02:20:19 +0000
commit46c59b1976b9dbe66671f863e50a35ec07574196 (patch)
tree5661a68642b08b5fd048d2d183cc1e964fb3dae3 /cachegrind
parent152cb593d81f04d738e35007ae853e034f1b5220 (diff)
Make ULong_width(0) return 1 instead of 1431655765. This stops
cachegrind segfaulting if it can't open its output file. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4973 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'cachegrind')
-rw-r--r--cachegrind/cg_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c
index 3e6008e4..ec493c76 100644
--- a/cachegrind/cg_main.c
+++ b/cachegrind/cg_main.c
@@ -1118,6 +1118,7 @@ static UInt ULong_width(ULong n)
n = n / 10;
w++;
}
+ if (w == 0) w = 1;
return w + (w-1)/3; // add space for commas
}