Commit a0f8de19 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix bug #664 in printSample()

printSample() was attempting to round the fractional part of the time,
but not propagated to the non-fractional part.  It's probably better not
to attempt to round the time at all.
parent fa2879a0
......@@ -389,7 +389,7 @@ printSample(rtsBool beginSample, StgDouble sampleValue)
fractionalPart = modf(sampleValue, &integralPart);
fprintf(hp_file, "%s %d.%02d\n",
(beginSample ? "BEGIN_SAMPLE" : "END_SAMPLE"),
(int)integralPart, (int)(fractionalPart * 100 + 0.5));
(int)integralPart, (int)(fractionalPart * 100));
}
/* --------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment