From 88576cf028cf22b46a86aceb26ee64a66c6e7a3c Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 28 Jun 2022 07:36:52 +0000 Subject: [PATCH] tparm %l should push strlen(pop) onto the stack not insert it into the result, from ncurses 5.9 patch 20130126: + change %l behavior in tparm to push the string length onto the stack rather than saving the formatted length into the output buffer (report by Roy Marples, cf: 980620). ok millert --- lib/libcurses/tinfo/lib_tparm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libcurses/tinfo/lib_tparm.c b/lib/libcurses/tinfo/lib_tparm.c index 45c07f01e06..2e54a43aba5 100644 --- a/lib/libcurses/tinfo/lib_tparm.c +++ b/lib/libcurses/tinfo/lib_tparm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_tparm.c,v 1.9 2010/01/12 23:22:06 nicm Exp $ */ +/* $OpenBSD: lib_tparm.c,v 1.10 2022/06/28 07:36:52 nicm Exp $ */ /**************************************************************************** * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * @@ -45,7 +45,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.9 2010/01/12 23:22:06 nicm Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.10 2022/06/28 07:36:52 nicm Exp $") /* * char * @@ -552,7 +552,7 @@ tparam_internal(const char *string, va_list ap) break; case 'l': - save_number("%d", (int) strlen(spop()), 0); + npush((int) strlen(spop())); break; case 's': -- 2.20.1