mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-05 05:09:59 +00:00
Fix use of strncmp
This commit is contained in:
parent
687ff4bdbb
commit
b12eef1d56
13 changed files with 99 additions and 77 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue