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
This commit is contained in:
Julian Seward 2005-11-01 02:20:19 +00:00
parent 5b51eeb7ae
commit d5afec1f4b

View 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
}