mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-03-15 04:13:59 +03:00
decompile strchr
This commit is contained in:
parent
e5ef31fe37
commit
73e7e36375
@ -25,4 +25,15 @@ size_t strlen(const char* s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/string/strchr.s")
|
const char* strchr(const char* s, int c) {
|
||||||
|
const unsigned char ch = c;
|
||||||
|
|
||||||
|
while (*s != ch) {
|
||||||
|
if (*s == '\0') {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user