From: mpi Date: Fri, 6 Sep 2024 07:58:50 +0000 (+0000) Subject: Interpret the argument of '%c' as an integer instead of a string. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6243ff0b1bb0d49cdafa445b5ba769db252722c7;p=openbsd Interpret the argument of '%c' as an integer instead of a string. From Christian Ludwig. --- diff --git a/usr.sbin/btrace/printf.c b/usr.sbin/btrace/printf.c index d7a9424dce6..49d046ab45d 100644 --- a/usr.sbin/btrace/printf.c +++ b/usr.sbin/btrace/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.2 2020/09/18 19:19:38 jasper Exp $ */ +/* $OpenBSD: printf.c,v 1.3 2024/09/06 07:58:50 mpi Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -400,7 +400,7 @@ getchr(void) if (gargv == NULL) return((int)'\0'); - c = (int)*ba2str(gargv, gdevt); + c = ba2long(gargv, gdevt); gargv = SLIST_NEXT(gargv, ba_next); return c; }