From d3f2f4f6ac35d33e67b09ca87fb703a6beca2a7d Mon Sep 17 00:00:00 2001 From: erorcun Date: Mon, 28 Dec 2020 03:25:26 +0300 Subject: Ped: WeaponInfo: little fixes and renamings --- src/weapons/WeaponInfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/weapons/WeaponInfo.cpp') diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp index 30c6c8cb..acb11a88 100644 --- a/src/weapons/WeaponInfo.cpp +++ b/src/weapons/WeaponInfo.cpp @@ -164,10 +164,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; -- cgit v1.2.3