mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +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…
Reference in New Issue
Block a user