mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 20:26:22 +00:00
Fix use of strncmp
This commit is contained in:
@ -1778,7 +1778,7 @@ CPed::LoadFightData(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (strncmp(animName, "null", 4) != 0) {
|
||||
if (strcmp(animName, "null") != 0) {
|
||||
animAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, animName);
|
||||
tFightMoves[moveId].animId = (AnimationId)animAssoc->animId;
|
||||
} else {
|
||||
|
@ -79,7 +79,7 @@ CPedType::LoadPedData(void)
|
||||
// Game uses just "line" here since sscanf already trims whitespace, but this is safer
|
||||
sscanf(&line[lp], "%s", word);
|
||||
|
||||
if(strncmp(word, "Threat", 7) == 0){
|
||||
if(strcmp(word, "Threat") == 0){
|
||||
flags = 0;
|
||||
lp += 7;
|
||||
while(sscanf(&line[lp], "%s", word) == 1 && lp <= linelen){
|
||||
@ -92,7 +92,7 @@ CPedType::LoadPedData(void)
|
||||
lp++;
|
||||
}
|
||||
ms_apPedType[type]->m_threats = flags;
|
||||
}else if(strncmp(word, "Avoid", 6) == 0){
|
||||
}else if(strcmp(word, "Avoid") == 0){
|
||||
flags = 0;
|
||||
lp += 6;
|
||||
while(sscanf(&line[lp], "%s", word) == 1 && lp <= linelen){
|
||||
|
Reference in New Issue
Block a user