From d3aac712502fa22009fecbe4e40d5bc9ff99f6a0 Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Thu, 18 Dec 2003 22:40:03 +0000 Subject: [PATCH] * src/devices/grops/ps.cc (ps_output::put_float): Fix line length computation. --- src/devices/grops/ps.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp index 60be928e..2ab1e077 100644 --- a/src/devices/grops/ps.cpp +++ b/src/devices/grops/ps.cpp @@ -336,8 +336,7 @@ ps_output &ps_output::put_float(double d) if (buf[last] == '.') last--; buf[++last] = '\0'; - int len = last + 1; - if (col > 0 && col + len + need_space > max_line_length) { + if (col > 0 && col + last + need_space > max_line_length) { putc('\n', fp); col = 0; need_space = 0; @@ -347,7 +346,7 @@ ps_output &ps_output::put_float(double d) col++; } fputs(buf, fp); - col += len; + col += last; need_space = 1; return *this; } -- 2.11.4.GIT