lib/cmdline.c: fix get_options() overflow while parsing ranges