An engineer writes an algorithm for an autonomous drone to find the shortest delivery path between two depots. When the algorithm is executed, it runs to completion without any system crashes or halts, but the drone takes a highly inefficient route that is not the shortest path.
Explain what is meant by a logic error, making reference to this scenario.