Module Name: src
Committed By: ragge
Date: Sun Apr 29 19:01:16 UTC 2018
Modified Files:
src/sys/arch/vax/vax: db_disasm.c
Log Message:
Fix bug causing small constants not to be printed out.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/vax/vax/db_disasm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/vax/vax/db_disasm.c
diff -u src/sys/arch/vax/vax/db_disasm.c:1.22 src/sys/arch/vax/vax/db_disasm.c:1.23
--- src/sys/arch/vax/vax/db_disasm.c:1.22 Mon May 22 16:39:41 2017
+++ src/sys/arch/vax/vax/db_disasm.c Sun Apr 29 19:01:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.22 2017/05/22 16:39:41 ragge Exp $ */
+/* $NetBSD: db_disasm.c,v 1.23 2018/04/29 19:01:15 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.22 2017/05/22 16:39:41 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.23 2018/04/29 19:01:15 ragge Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -471,7 +471,7 @@ add_int(inst_buffer *ib, int i)
{
char buf[32];
if (i < 100 && i > -100)
- snprintf(ib->curp, sizeof(buf), "%d", i);
+ snprintf(buf, sizeof(buf), "%d", i);
else
snprintf(buf, sizeof(buf), "0x%x", i);
add_str(ib, buf);