summaryrefslogtreecommitdiff
path: root/lang/ucblogo/patches/patch-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ucblogo/patches/patch-print.c')
-rw-r--r--lang/ucblogo/patches/patch-print.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lang/ucblogo/patches/patch-print.c b/lang/ucblogo/patches/patch-print.c
index 4d3cf4ff865..b599aa1d0b2 100644
--- a/lang/ucblogo/patches/patch-print.c
+++ b/lang/ucblogo/patches/patch-print.c
@@ -1,8 +1,17 @@
-$NetBSD: patch-print.c,v 1.1 2013/07/18 12:05:09 joerg Exp $
+$NetBSD: patch-print.c,v 1.2 2015/11/06 20:33:21 joerg Exp $
---- print.c.orig 2013-07-17 14:26:15.000000000 +0000
+--- print.c.orig 2008-03-01 01:04:41.000000000 +0000
+++ print.c
-@@ -229,7 +229,7 @@ void real_print_node(FILE *strm, NODE *n
+@@ -254,7 +254,7 @@ void real_print_node(FILE *strm, NODE *n
+ } else if ((unsigned int)nd < 200) { /* for debugging */
+ char num[] = "{small} ";
+
+- sprintf(&num[7],"%d",nd);
++ snprintf(&num[7], sizeof(num) - 7,"%u",(unsigned int)nd);
+ ndprintf(strm,num);
+ } else if ((ndty = nodetype(nd)) & NT_PRIM) {
+ ndprintf(strm, "PRIM");
+@@ -281,7 +281,7 @@ void real_print_node(FILE *strm, NODE *n
if (print_backslashes && (getarrorg(nd) != 1)) {
char org[] = "@ ";