math/yorick: avoid printf %n. The remaining %n in this port end up in
*scanf() and fputs() (YError() chasing done by naddy) ok naddy
This commit is contained in:
parent
34bcb36b3a
commit
2433f9818f
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.28 2019/07/12 20:47:47 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.29 2021/09/15 21:53:13 tb Exp $
|
||||
|
||||
# Memory hog, stuck for days on the same file during build.
|
||||
NOT_FOR_ARCHS= sh
|
||||
@ -7,7 +7,7 @@ COMMENT= interpreted language for scientific computing
|
||||
|
||||
VERSION= 2.1.06
|
||||
DISTNAME= yorick-${VERSION}
|
||||
REVISION = 3
|
||||
REVISION = 4
|
||||
|
||||
CATEGORIES= math devel
|
||||
|
||||
|
14
math/yorick/patches/patch-play_x11_fonts_c
Normal file
14
math/yorick/patches/patch-play_x11_fonts_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-play_x11_fonts_c,v 1.1 2021/09/15 21:53:13 tb Exp $
|
||||
|
||||
Index: play/x11/fonts.c
|
||||
--- play/x11/fonts.c.orig
|
||||
+++ play/x11/fonts.c
|
||||
@@ -100,7 +100,7 @@ x_font(x_display *xdpy, int font, int pixsize)
|
||||
char *pnm = nm;
|
||||
int n = 7;
|
||||
while (n--) while ((*(pnm++)= *(name++))!='-');
|
||||
- sprintf(pnm, "%d%n", pixsize, &n);
|
||||
+ n = sprintf(pnm, "%d", pixsize);
|
||||
strcpy(pnm+n, name);
|
||||
tmp_fonts = XListFonts(xdpy->dpy, nm, 4, &n);
|
||||
if (n<=0) return xdpy->font; /* should never happen (X server bug) */
|
Loading…
Reference in New Issue
Block a user