diff --git a/ncat/ncat_main.c b/ncat/ncat_main.c index 955ae8847..05e8d52e2 100644 --- a/ncat/ncat_main.c +++ b/ncat/ncat_main.c @@ -382,8 +382,8 @@ int main(int argc, char *argv[]) a, gai_strerror(rc)); } o.srcrtes[o.numsrcrtes] = addr.in.sin_addr; - } while (o.numsrcrtes++ <= 8 && (a = strtok(NULL, ","))); - if (o.numsrcrtes > 8) + } while (++o.numsrcrtes < 8 && (a = strtok(NULL, ","))); + if (strtok(NULL, ",")) bye("Sorry, you gave too many source route hops."); break; }