提交 82c41e92 编写于 作者: R Rich Felker

fix undefined pointer comparison in wmemmove

上级 debadaa2
#include <wchar.h>
#include <stdint.h>
wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n)
{
wchar_t *d0 = d;
if ((size_t)(d-s) < n)
if ((uintptr_t)d-(uintptr_t)s < n * sizeof *d)
while (n--) d[n] = s[n];
else
while (n--) *d++ = *s++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册