summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-05-10 23:43:52 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-15 10:16:10 +0200
commitbb9121dbd4690405b54e7e6ed6e711ead16435ac (patch)
treeefb930ab320c6be74d4ca8e4d5d674e3d1e7812d /src/saveload
parent031e91de6e06e6b0d12603d78170f92f5def1d00 (diff)
downloadopenttd-bb9121dbd4690405b54e7e6ed6e711ead16435ac.tar.xz
Fix: comparison of narrow type to wide type in loop (potential for infinite loops)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/linkgraph_sl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp
index f571e331a..e46054cf0 100644
--- a/src/saveload/linkgraph_sl.cpp
+++ b/src/saveload/linkgraph_sl.cpp
@@ -139,7 +139,7 @@ static const SaveLoad _edge_desc[] = {
*/
void SaveLoad_LinkGraph(LinkGraph &lg)
{
- uint size = lg.Size();
+ uint16 size = lg.Size();
for (NodeID from = 0; from < size; ++from) {
Node *node = &lg.nodes[from];
SlObject(node, _node_desc);