From fe459b4700da0b1f50545f64bd4f1d215e9fe028 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 28 Sep 2024 13:50:30 +0300 Subject: [PATCH] Fix field by index lookup Field at index zero is an invalid field with offset set to 0 Field at index one is a valid field (modelindex) with offset set to 0 as well Field by index lookup should start with one, modelindex field would never be picked otherwise --- Quake/pr_edict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quake/pr_edict.c b/Quake/pr_edict.c index ada808c38..655fcbc5e 100644 --- a/Quake/pr_edict.c +++ b/Quake/pr_edict.c @@ -196,7 +196,7 @@ static ddef_t *ED_FieldAtOfs (int ofs) ddef_t *def; int i; - for (i = 0; i < progs->numfielddefs; i++) + for (i = 1; i < progs->numfielddefs; i++) { def = &pr_fielddefs[i]; if (def->ofs == ofs)