-/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
{
wchar_t *wcp = (wchar_t *) dest - 1;
wint_t c;
- const ptrdiff_t off = src - dest + 1;
do
{
if (__glibc_unlikely (destlen-- == 0))
__chk_fail ();
- c = wcp[off];
+ c = *src++;
*++wcp = c;
}
while (c != L'\0');