diff --git a/src/map.c b/src/map.c index af6b75b..b7ebae5 100644 --- a/src/map.c +++ b/src/map.c @@ -189,9 +189,10 @@ static void map_render(double bx, double by, double w, double h) { // calculating from x to y the line must go. :) for(j = 0; j < sys->njumps; j++) { // Set the colours, is the route the current one? - if(((cur_system == sys) && (j == hyperspace_target)) || - ((cur_system == &systems_stack[sys->jumps[j]]) && - (sys = &systems_stack[cur_system->jumps[hyperspace_target]]))) + if((hyperspace_target != -1) && + (((cur_system == sys) && (j == hyperspace_target)) || + ((cur_system == &systems_stack[sys->jumps[j]]) && + (sys == &systems_stack[cur_system->jumps[hyperspace_target]])))) col = &cRed; // Is the route part of the path? else if(map_inPath(&systems_stack[sys->jumps[j]]) && map_inPath(sys))