From da425a114d4d429841a9b60f847c07f5f5697feb Mon Sep 17 00:00:00 2001 From: midipix Date: Nov 11 2017 22:56:37 +0000 Subject: ptyc_console_writer(): properly handle leftover bytes. --- diff --git a/src/console/ptyc_console_writer.c b/src/console/ptyc_console_writer.c index 8621515..699d0fb 100644 --- a/src/console/ptyc_console_writer.c +++ b/src/console/ptyc_console_writer.c @@ -69,7 +69,7 @@ int __stdcall ptyc_console_writer(struct ptyc_driver_ctx_impl * ictx) /* account for leftover bytes from the previous conversion */ tctx->data.in[0] = uc_params.leftover_bytes; - uc_params.src = inbuf - uc_params.leftover_bytes; + uc_params.src = inbuf - uc_params.leftover_count; uc_params.src_size_in_bytes = iosb.info + uc_params.leftover_count; uc_params.dst = tctx->data.out;