diff --git a/pdf.c b/pdf.c
index f812db8584640d7e427631eafe92b3b1e0badbe4..4e03fdfe36aef82410abd537a0ddb45f880eaee0 100644
--- a/pdf.c
+++ b/pdf.c
@@ -1806,13 +1806,13 @@ LZWDecode(const Dict *parms, HBytes b, HParser *p)
 	ret = lzw_decompress(write_lzw_buffer, read_lzw_buffer);
 	if (ret) {
 		fprintf(stderr, "lzw_decompress: error (%d)\n", ret);
-		assert(!"LZWDecode: failed to decompress");
+		assert(!"LZWDecode: failed to decompress\n");
 	}
 	done = depredict(&pred, cur_lzw_spec->lzw_buf, cur_lzw_spec->write_head-1);
 
 	if(!done)
 	{
-		fprintf(stderr, "LZWDecode: unexpected end of input (depred returns 0, but there are no more bytes");
+		fprintf(stderr, "LZWDecode: unexpected end of input (depred returns 0, but there are no more bytes\n");
 	}
 
 	res = h_parse(p, pred.out, pred.nout);