Changeset 1791

Show
Ignore:
Timestamp:
09/06/10 19:25:43 (17 months ago)
Author:
spf
Message:

added more safety lines

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/vlm-c/waypoint.c

    r1790 r1791  
    11/** 
    2  * $Id: waypoint.c,v 1.10 2010-09-06 19:16:40 ylafon Exp $ 
     2 * $Id: waypoint.c,v 1.11 2010-09-06 19:24:25 ylafon Exp $ 
    33 * 
    44 * (c) 2008 by Yves Lafon 
     
    225225              intersect_ratio * (current_longitude - prev_longitude); 
    226226            *intersection = intersect_ratio; 
    227             isect = 1; 
     227          } else { 
     228            /* should not happen, but let's be safe here */ 
     229            *isect_latitude = yToLat(current_latitude); 
     230            *isect_longitude = current_longitude; 
     231            *intersection = 1; 
    228232          } 
     233          isect = 1; 
    229234        } 
    230235      } 
     
    266271              intersect_ratio * (current_longitude - prev_longitude); 
    267272            *intersection = intersect_ratio; 
    268             isect = 1; 
     273          } else { 
     274            /* should not happen, but let's be safe here */ 
     275            *isect_latitude = yToLat(current_latitude); 
     276            *isect_longitude = current_longitude; 
     277            *intersection = 1; 
    269278          } 
    270279        }