summaryrefslogtreecommitdiff
path: root/gammu
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2011-11-07 10:49:55 +0100
committerMichal Čihař <michal@cihar.com>2011-11-07 10:49:55 +0100
commitb0f42d7c65e223a95a7fca8c00986a77695807d2 (patch)
tree14741089ad59bee43bc4a880786ec6710f1fc320 /gammu
parentd2d555e42d4be030e42ef9d3aa4e39d5ed1a3172 (diff)
Imported Upstream version 1.30.90
Diffstat (limited to 'gammu')
-rw-r--r--gammu/misc.c4
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;