diff options
author | Michal Čihař <michal@cihar.com> | 2011-11-07 10:49:55 +0100 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2011-11-07 10:49:55 +0100 |
commit | b0f42d7c65e223a95a7fca8c00986a77695807d2 (patch) | |
tree | 14741089ad59bee43bc4a880786ec6710f1fc320 /gammu | |
parent | d2d555e42d4be030e42ef9d3aa4e39d5ed1a3172 (diff) |
Imported Upstream version 1.30.90
Diffstat (limited to 'gammu')
-rw-r--r-- | gammu/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gammu/misc.c b/gammu/misc.c index 9aed329..78a02ae 100644 --- a/gammu/misc.c +++ b/gammu/misc.c @@ -267,8 +267,8 @@ void GetLocation(int argc UNUSED, char *argv[]UNUSED) lac = strtol(netinfo.LAC, NULL, 16); cellid = strtol(netinfo.CID, NULL, 16); - /* Split code to country and network */ - if (sscanf(netinfo.NetworkCode, "%ld %ld", &mcc, &mnc) != 2) { + /* Split code to country and network (beware ncc+nmc without space) */ + if (sscanf(netinfo.NetworkCode, "%3ld%ld", &mcc, &mnc) != 2) { printf_err("%s", _("Wrong network code from phone!\n")); GSM_Terminate(); return; |