bliksemlabs / rrrr

RRRR rapid real-time routing
BSD 2-Clause "Simplified" License
164 stars 32 forks source link

--from-latlon not working in the ansi branch #161

Closed johannilsson closed 9 years ago

johannilsson commented 9 years ago

Hi all,

Was getting the following error when I was running the ansi branch, "Search target could not be initialised.".

Not really a c coder but I did the following change to get it up and running.

diff --git a/cli.c b/cli.c
index 0422c5d..88dd466 100644
--- a/cli.c
+++ b/cli.c
@@ -205,7 +205,7 @@ int main (int argc, char *argv[]) {
                     #ifdef RRRR_FEATURE_LATLON
                     else if (strncmp(argv[i], "--from-latlon=", 14) == 0) {
                         /* TODO: check return value */
-                        strtolatlon(&argv[i][12], &req.from_latlon);
+                        strtolatlon(&argv[i][14], &req.from_latlon);
                     }
                     #endif
                     break;

Cheers!

skinkie commented 9 years ago

Thanks, you are right. Great way to start with C though ;)

andreyz commented 9 years ago

:+1: