From: Markus Armbruster Date: Sun, 11 Jan 2015 11:25:03 +0000 (+0100) Subject: update: Clean up misuse of wu() in prod_nat() X-Git-Tag: v4.3.33~75 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=9e643dad00dbe1a5dcc2a989bb2b767c9863d787 update: Clean up misuse of wu() in prod_nat() Don't use multiple calls of wu() to print a single line, because that creates a separate telegram for each part. The read command normally merges the telegrams, but if they are more than five seconds apart (clock jumped somehow), we get a telegram header in the middle of a line. Unlikely to happen, but clean it up anyway. The misuse has always been there. Signed-off-by: Markus Armbruster --- diff --git a/src/lib/update/nat.c b/src/lib/update/nat.c index e73258860..d6ccbec26 100644 --- a/src/lib/update/nat.c +++ b/src/lib/update/nat.c @@ -29,6 +29,7 @@ * Known contributors to this file: * Dave Pare, 1989 * Steve McClure, 1997 + * Markus Armbruster, 2006-2015 */ #include @@ -188,9 +189,9 @@ prod_nat(int etu) tlev = levels[n][NAT_TLEV]; rlev = levels[n][NAT_RLEV]; if (tech[n] != 0.0 || res[n] != 0.0) { - wu(0, n, "%5.4f technology (%5.4f + %5.4f), ", - tlev + tech[n], tlev, tech[n]); - wu(0, n, "%5.4f research (%5.4f + %5.4f) produced\n", + wu(0, n, "%5.4f technology (%5.4f + %5.4f), " + "%5.4f research (%5.4f + %5.4f) produced\n", + tlev + tech[n], tlev, tech[n], rlev + res[n], rlev, res[n]); } else wu(0, n, "%5.4f tech, %5.4f research produced\n", tlev, rlev);