This maintains the type information which can be used for enforce
const-correctness and also for implementing more advanced ways of
handling the type information.
Since atoi return 0 on error the code tries to access the waypoint list
with index -1 which causes an assert in the lookup code. This fixes that
by using the error detection capabilities of strtol.