<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1">
</HEAD>
<BODY>
<PRE>
---
libs/wpp/ppl.l | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
index e71bf6e..ab2efe6 100644
--- a/libs/wpp/ppl.l
+++ b/libs/wpp/ppl.l
@@ -1440,8 +1440,12 @@ static void put_buffer(const char *s, int len)
{
        if(top_macro())
                add_text_to_macro(s, len);
-        else
- fwrite(s, 1, len, ppy_out);
+        else if (fwrite(s, 1, len, ppy_out) != len)
+ {
+ /* exit if fwrite fails */
+ perror ("fwrite failed");
+ exit (1);
+ }
}
--
1.5.6.3
</PRE>
</BODY>
</HTML>