Module: wine Branch: master Commit: 3345404cbe5f5945e0fbc4d495db40365a9eda58 URL: https://gitlab.winehq.org/wine/wine/-/commit/3345404cbe5f5945e0fbc4d495db403...
Author: Piotr Caban piotr@codeweavers.com Date: Mon Jul 31 15:31:40 2023 +0200
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; }