bugfix
authorladanyi
Fri, 26 Aug 2005 10:46:51 +0000
changeset 164995c8cd25a456
parent 1648 dd8672338691
child 1650 422906271d22
bugfix
gui/mapstorage.cc
     1.1 --- a/gui/mapstorage.cc	Fri Aug 26 07:35:23 2005 +0000
     1.2 +++ b/gui/mapstorage.cc	Fri Aug 26 10:46:51 2005 +0000
     1.3 @@ -245,14 +245,16 @@
     1.4      }
     1.5      else
     1.6      {
     1.7 -      EdgeIt e(graph);
     1.8 -      double max = (*edgemap_storage["id"])[e];
     1.9 -      for (; e != INVALID; ++e)
    1.10 +      double max = std::numeric_limits<double>::min();
    1.11 +      for (EdgeIt e(graph); e != INVALID; ++e)
    1.12        {
    1.13          if ((*edgemap_storage["id"])[e] > max)
    1.14            max = (*edgemap_storage["id"])[e];
    1.15        }
    1.16 -      edgemap_default["id"] = max + 1.0;
    1.17 +      if (max > std::numeric_limits<double>::min())
    1.18 +        edgemap_default["id"] = max + 1.0;
    1.19 +      else
    1.20 +        edgemap_default["id"] = 1.0;
    1.21      }
    1.22    }
    1.23