]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make ULong_width(0) return 1 instead of 1431655765. This stops
authorJulian Seward <jseward@acm.org>
Tue, 1 Nov 2005 02:20:19 +0000 (02:20 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 1 Nov 2005 02:20:19 +0000 (02:20 +0000)
cachegrind segfaulting if it can't open its output file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4973

cachegrind/cg_main.c

index 3e6008e4de4f4cd6ea9682c6129495bacb6acc61..ec493c7656b4d2977b8431f15853ee75997c525c 100644 (file)
@@ -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
 }