summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-06-17 20:37:07 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-06-17 20:37:07 +0000
commitd9985c333178da2f965933a64242c47541e9145e (patch)
tree80d24442e180a2919288bf4c0ad01c97afde58ec /src
parentbe3b25fd65d7c92479286d99a2ce073933249b1d (diff)
downloadopenttd-d9985c333178da2f965933a64242c47541e9145e.tar.xz
(svn r25422) -Fix: properly initialize base capacity for paths
Diffstat (limited to 'src')
-rw-r--r--src/linkgraph/linkgraphjob.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp
index fc94d49cc..2feaa8b92 100644
--- a/src/linkgraph/linkgraphjob.cpp
+++ b/src/linkgraph/linkgraphjob.cpp
@@ -177,7 +177,7 @@ uint Path::AddFlow(uint new_flow, LinkGraphJob &job, uint max_saturation)
*/
Path::Path(NodeID n, bool source) :
distance(source ? 0 : UINT_MAX),
- capacity(0),
+ capacity(source ? UINT_MAX : 0),
free_capacity(source ? INT_MAX : INT_MIN),
flow(0), node(n), origin(source ? n : INVALID_NODE),
num_children(0), parent(NULL)