/****************************************************************************
- * Copyright (c) 2001-2014,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2001-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <tic.h>
#include <ctype.h>
-MODULE_ID("$Id: visbuf.c,v 1.47 2016/05/28 23:29:37 tom Exp $")
+MODULE_ID("$Id: visbuf.c,v 1.49 2017/10/21 23:34:20 tom Exp $")
#define NUM_VISBUFS 4
PUTC_n = (int) wcrtomb(PUTC_buf,
buf[j].chars[PUTC_i], &PUT_st);
if (PUTC_n <= 0 || buf[j].chars[PUTC_i] > 255) {
- sprintf(temp, "{%d:\\u%x}",
- wcwidth(buf[j].chars[PUTC_i]),
- buf[j].chars[PUTC_i]);
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
+ "{%d:\\u%lx}",
+ wcwidth(buf[j].chars[PUTC_i]),
+ (unsigned long) buf[j].chars[PUTC_i]);
(void) _nc_trace_bufcat(bufnum, temp);
break;
}