From: Johannes Sixt Date: Wed, 16 Sep 2026 06:13:15 GMT Subject: Re: [PATCH] compat/winansi: fix die_lasterr() argument formatting Message-ID: <1cb6ad12-27bc-458e-b8f5-4b7eb44356fe@kdbg.org> In-Reply-To: <20260916042312.35891-1-yqtian668@gmail.com> Am 16.09.26 um 06:23 schrieb Yongqiang Tian: > During WinANSI initialization, duplicate_handle() reports the handle > when DuplicateHandle() fails: > > die_lasterr("DuplicateHandle(%li) failed", ...); The full call is more like die_lasterr("DuplicateHandle(%li) failed", (long) (intptr_t) hnd); This attempts to format the Windows handle value into the error message. That's a pointless exercise, becaues AFAIK the value is totally opaque and unhelpful as a debugging aid. For this reason, I'd suggest to go the simpler route to remove the formatting from the above call (the only one that passes more than just a string) and have die_lasterr take just a single string and no variable argument list. -- Hannes