diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-28 03:25:26 +0300 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-28 04:02:24 +0300 |
commit | dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41 (patch) | |
tree | 5a28ce79da2b6682f3ad88fed50a8bf58ee5920f /src/weapons | |
parent | 498d3a49ac2d7701af0456b050702807b544188b (diff) |
Ped: WeaponInfo: little fixes and renamings
Diffstat (limited to 'src/weapons')
-rw-r--r-- | src/weapons/WeaponInfo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp index 546aa6ba..b40329c8 100644 --- a/src/weapons/WeaponInfo.cpp +++ b/src/weapons/WeaponInfo.cpp @@ -76,10 +76,9 @@ CWeaponInfo::LoadWeaponData(void) line[linelen] = '\0'; // skip white space - for (lp = 0; line[lp] <= ' '; lp++); + for (lp = 0; line[lp] <= ' ' && line[lp] != '\0'; lp++); - if (lp >= linelen || // FIX: game uses == here, but this is safer if we have empty lines - line[lp] == '#') + if (line[lp] == '\0' || line[lp] == '#') continue; spread = 0.0f; |