diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-09-10 13:55:44 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-09-10 13:55:44 +0000 |
commit | 3150625201d9c293e5c34b19b8a2d48a27da5f07 (patch) | |
tree | 4b83d615adb9f3870c56fd4e3caf62956df0f12c /literal.c | |
parent | 8c36b0434ca4a5ba6df2724542048eb219af7a34 (diff) |
Notes
Diffstat (limited to 'literal.c')
-rw-r--r-- | literal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/literal.c b/literal.c index 6c2496f2f044..f6eac26937e8 100644 --- a/literal.c +++ b/literal.c @@ -1,4 +1,4 @@ -/* $NetBSD: literal.c,v 1.3 2017/06/30 20:26:52 kre Exp $ */ +/* $NetBSD: literal.c,v 1.5 2019/07/23 13:10:11 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: literal.c,v 1.3 2017/06/30 20:26:52 kre Exp $"); +__RCSID("$NetBSD: literal.c,v 1.5 2019/07/23 13:10:11 christos Exp $"); #endif /* not lint && not SCCSID */ /* @@ -98,8 +98,8 @@ literal_add(EditLine *el, const wchar_t *buf, const wchar_t *end, int *wp) return 0; for (n = 0, i = 0; i < len; i++) - n += ct_encode_char(b + n, w - n, buf[i]); - n += ct_encode_char(b + n, w - n, end[1]); + n += ct_encode_char(b + n, (size_t)(w - n), buf[i]); + n += ct_encode_char(b + n, (size_t)(w - n), end[1]); b[n] = '\0'; /* |