Show
Ignore:
Timestamp:
03/29/08 15:02:16 (8 months ago)
Author:
dom
Message:

Patch to disallow placement if segment_length=0 from jonb (fixes #86)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/placement_finder.cpp

    r639 r683  
    562562       
    563563      double segment_length = path_distances[index]; 
     564      if (segment_length == 0) { 
     565          // Not allowed to place across on 0 length segments or discontinuities 
     566          return std::auto_ptr<placement_element>(NULL); 
     567      } 
    564568       
    565569      current_placement->starting_x = old_x + dx*distance/segment_length; 
     
    585589 
    586590         //Coordinates this character will start at 
     591        if (segment_length == 0) { 
     592            // Not allowed to place across on 0 length segments or discontinuities 
     593            return std::auto_ptr<placement_element>(NULL); 
     594        } 
    587595         double start_x = old_x + dx*distance/segment_length; 
    588596         double start_y = old_y + dy*distance/segment_length;