From 6af9bc3cfd1a8b57687b50399f1d0730beba6533 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 3 Dec 1996 09:22:15 +0000 Subject: [PATCH] Corretto azzeramento di numeri reali nulli git-svn-id: svn://10.65.10.50/trunk@3955 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/printapp.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/printapp.cpp b/include/printapp.cpp index 866c2e717..61c2667fc 100755 --- a/include/printapp.cpp +++ b/include/printapp.cpp @@ -927,7 +927,7 @@ void TPrint_application::set_row ( case 'r': // Real { const real& rrr = * va_arg (params, real *); - if (_picture[0] && (formato[2] == '\0' || formato == "%Lf")) + if (_picture[0] && (formato.len() == 2 || formato == "%Lf")) { // no format specifications // use default picture @@ -944,7 +944,7 @@ void TPrint_application::set_row ( q = __tmp_string; } if (rrr.is_zero () && !_print_zero) - q.fill (' '); + q.fill (' ', q.len()); } break; default: @@ -1180,7 +1180,7 @@ bool TPrint_application::print_one ( { // it's a _FieldTok _FieldTok *ft = (_FieldTok *) t; - TString toprint; + TString256 toprint; from = to = -1; if (ft->_flags & FONT_FLAG) @@ -1274,7 +1274,7 @@ bool TPrint_application::print_one ( } else if (ft->_flags & NUMBER_FLAG) { - TString pict (0); + TString80 pict; real r(f.get (fn)); bool isreal = f.curr ().type (fn) == _realfld; @@ -1292,7 +1292,7 @@ bool TPrint_application::print_one ( toprint = r.string (); if (r.is_zero () && !_print_zero) - toprint.fill (' '); + toprint.fill (' ', toprint.len()); } else if (ft->_flags & STRING_FLAG) { @@ -1415,7 +1415,7 @@ bool TPrint_application::print_one ( } ps = __tmp_string; if (rrr.is_zero () && !_print_zero) - ps.fill (' '); + ps.fill (' ', ps.len()); break; } }