Fix strchr() and strrchr() on mips64
authorvisa <visa@openbsd.org>
Sat, 24 Jul 2021 05:35:56 +0000 (05:35 +0000)
committervisa <visa@openbsd.org>
Sat, 24 Jul 2021 05:35:56 +0000 (05:35 +0000)
commit24bb5fcea3ed904bc467217bdaadb5dfc618d5bf
tree81a8f79d68325ccf119675b8267d4ed7e1487ee4
parent6dde45b5fe8d2ed5afd2fbfaa07d116ab8033451
Fix strchr() and strrchr() on mips64

Truncate the character arguments of strchr() and strrchr() to eight bits
so that the implied char conversion would work correctly. Otherwise the
functions would always return NULL when the character argument is
negative.

OK miod@
lib/libc/arch/mips64/string/strchr.S
lib/libc/arch/mips64/string/strrchr.S