[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8033: Not the byte compiler; problem lies deeper
From: |
Michael Welsh Duggan |
Subject: |
bug#8033: Not the byte compiler; problem lies deeper |
Date: |
Mon, 14 Feb 2011 17:10:56 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Chong Yidong <cyd@stupidchicken.com> writes:
> Michael Welsh Duggan <md5i@md5i.com> writes:
>
>> Here is a patch which fixes this problem.
>>
>> *** src/print.c 2011-02-14 15:39:19 +0000
>> --- src/print.c 2011-02-14 20:24:00 +0000
>> ***************
>> *** 1063,1068 ****
>> --- 1063,1070 ----
>> /* Generate the fewest number of digits that represent the
>> floating point value without losing information. */
>> dtoastr (buf, FLOAT_TO_STRING_BUFSIZE, 0, 0, data);
>> + /* Force a decimal point even if integer */
>> + width = 1;
>> }
>> else /* oink oink */
>> {
Oh, and I should mention that without this patch, width gets used as an
uninitialized variable after the if clause, which is why it is pretty
random whether we get 1.0 or 1 in the output.
--
Michael Welsh Duggan
(md5i@md5i.com)