9
0
Fork 0

Fixed APN bug

This commit is contained in:
jjako 2005-03-14 22:03:05 +00:00
parent acba8e6c62
commit 9f26b95f30
1 changed files with 3 additions and 3 deletions

View File

@ -439,9 +439,9 @@ int process_options(int argc, char **argv) {
printf("Invalid APN\n"); printf("Invalid APN\n");
return -1; return -1;
} }
options.apn.l = strlen(args_info.apn_arg) + 1; options.apn.l = strlen(args_info.apn_arg);
options.apn.v[0] = (char) strlen(args_info.apn_arg); strncpy(options.apn.v, args_info.apn_arg, sizeof(options.apn.v));
strncpy(&options.apn.v[1], args_info.apn_arg, sizeof(options.apn.v)-1); options.apn.v[sizeof(options.apn.v)-1] = 0;
printf("Using APN: %s\n", args_info.apn_arg); printf("Using APN: %s\n", args_info.apn_arg);