1
0
Fork 0

Patch from Frederic Bouvier:

I had a segfault in case result.size() is 0 because result[i] is used
before knowing it exists. I inverted the test and it now goes well.
This commit is contained in:
david 2002-11-01 10:49:49 +00:00
parent 276ad45d0e
commit 9af342a033

View file

@ -190,7 +190,7 @@ point_list calc_elevations( const string& root, const point_list& geod_nodes,
while ( !done ) {
// find first node with -9999 elevation
i = 0;
while ( (result[i].z() > -9000) && (i < (int)result.size()) ) {
while ( (i < (int)result.size()) && (result[i].z() > -9000) ) {
++i;
}