DRistrcmp effectively matching

This commit is contained in:
Dethrace Labs 2025-09-08 14:55:00 +12:00 committed by Dethrace Engineering Department
parent 4fedb2c6b2
commit 78b94cdd25
1 changed files with 19 additions and 7 deletions

View File

@ -1641,15 +1641,27 @@ void SkipNLines(FILE* pF) {
// FUNCTION: CARM95 0x004c3d94
int DRStricmp(char* p1, char* p2) {
int val;
while (p1) {
// while (p1) {
// val = tolower(*p1) - tolower(*p2);
// if (val != 0) {
// return val;
// }
// p1++;
// p2++;
// }
// return 0;
do {
val = tolower(*p1) - tolower(*p2);
if (val != 0) {
return val;
if (val) {
break;
}
p1++;
p2++;
}
return 0;
if (!*(p1++)) {
break;
}
} while (*(p2++));
endm:
return val;
}
// IDA: void __usercall GlorifyMaterial(br_material **pArray@<EAX>, int pCount@<EDX>)