diff options
Diffstat (limited to 'heremaps-uc')
-rw-r--r-- | heremaps-uc/src/heremaps-uc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/heremaps-uc/src/heremaps-uc.c b/heremaps-uc/src/heremaps-uc.c index c40accf..2621092 100644 --- a/heremaps-uc/src/heremaps-uc.c +++ b/heremaps-uc/src/heremaps-uc.c @@ -75,8 +75,13 @@ static void read_file(heremaps_uc_app_data *ad) ret = fread(buf, 15, 1, fp); fclose(fp); - data = strtok_r(buf, "=", &save_token); - data = strtok_r(NULL, "=", &save_token); + if (ret > 0) + { + data = strtok_r(buf, "=", &save_token); + data = strtok_r(NULL, "=", &save_token); + } + else + LS_LOGE("UC_FILE read fail"); } app_control_create(&reply); |