From 3345404cbe5f5945e0fbc4d495db40365a9eda58 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 31 Jul 2023 15:31:40 +0200 Subject: [PATCH] wineps.drv: Flush spool data even if there are no pages to print. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55291 --- dlls/wineps.drv/printproc.c | 1 + dlls/wineps.drv/ps.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wineps.drv/printproc.c b/dlls/wineps.drv/printproc.c index 72e5540b5be..b899814f8c1 100644 --- a/dlls/wineps.drv/printproc.c +++ b/dlls/wineps.drv/printproc.c @@ -3140,6 +3140,7 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name) cleanup: if (data->ctx->job.PageNo) PSDRV_WriteFooter(data->ctx); + flush_spool(data->ctx); HeapFree(GetProcessHeap(), 0, data->ctx->job.doc_name); ClosePrinter(spool_data); diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index f9f54fa9bc6..a8050abe19b 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -502,7 +502,7 @@ INT PSDRV_WriteFooter( print_ctx *ctx ) sprintf(buf, psfooter, ctx->job.PageNo); - if( write_spool( ctx, buf, strlen(buf) ) != strlen(buf) || !flush_spool(ctx) ) { + if( write_spool( ctx, buf, strlen(buf) ) != strlen(buf) ) { WARN("WriteSpool error\n"); ret = 0; }