diff options
Diffstat (limited to 'src/newgrf_railtype.cpp')
-rw-r--r-- | src/newgrf_railtype.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index 60ddc1914..c57be5b6c 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -143,8 +143,9 @@ uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile) /* Look for a matching rail type label in the table */ RailTypeLabel label = GetRailTypeInfo(railtype)->label; - int index = grffile->railtype_list.FindIndex(label); - if (index >= 0) return index; + + int idx = find_index(grffile->railtype_list, label); + if (idx >= 0) return idx; /* If not found, return as invalid */ return 0xFF; |