Fix memccpy to handle end char >= x80
- use unsigned char variables for optimized version of memccpy
This commit is contained in:
parent
b5d4245d5f
commit
ad3f9820b1
|
@ -80,11 +80,11 @@ memccpy (void *__restrict dst0,
|
||||||
return ptr;
|
return ptr;
|
||||||
#else
|
#else
|
||||||
void *ptr = NULL;
|
void *ptr = NULL;
|
||||||
char *dst = dst0;
|
unsigned char *dst = dst0;
|
||||||
const char *src = src0;
|
const unsigned char *src = src0;
|
||||||
long *aligned_dst;
|
long *aligned_dst;
|
||||||
const long *aligned_src;
|
const long *aligned_src;
|
||||||
char endchar = endchar0 & 0xff;
|
unsigned char endchar = endchar0 & 0xff;
|
||||||
|
|
||||||
/* If the size is small, or either SRC or DST is unaligned,
|
/* If the size is small, or either SRC or DST is unaligned,
|
||||||
then punt into the byte copy loop. This should be rare. */
|
then punt into the byte copy loop. This should be rare. */
|
||||||
|
|
Loading…
Reference in New Issue