Mercurial > emacs
changeset 59095:8a2a99b47220
(code_convert_region): Fix calculation of `ratio'.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 27 Dec 2004 05:51:40 +0000 |
parents | 9ba68ebb293d |
children | 2447136abfc1 |
files | src/coding.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Mon Dec 27 05:32:49 2004 +0000 +++ b/src/coding.c Mon Dec 27 05:51:40 2004 +0000 @@ -5881,7 +5881,6 @@ REQUIRE + LEN_BYTE = LEN_BYTE * (NEW / ORIG) REQUIRE = LEN_BYTE * (NEW - ORIG) / ORIG Here, we are sure that NEW >= ORIG. */ - float ratio; if (coding->produced <= coding->consumed) { @@ -5891,7 +5890,8 @@ } else { - ratio = (coding->produced - coding->consumed) / coding->consumed; + float ratio = coding->produced - coding->consumed; + ratio /= coding->consumed; require = len_byte * ratio; } first = 0;