summaryrefslogtreecommitdiff
path: root/appinfo
diff options
context:
space:
mode:
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/appinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/appinfo/appinfo.c b/appinfo/appinfo.c
index d3c0718..5078f24 100644
--- a/appinfo/appinfo.c
+++ b/appinfo/appinfo.c
@@ -358,7 +358,7 @@ int appinfo_update_submode_execname_and_appid(const char* execname)
}
const size_t max_len = MAX_APPID - MAX_OSP_PKGID - 1;
- const size_t size = MIN(strlen(execname) - 1, max_len - 1);
+ const size_t size = MIN(strlen(execname), max_len - 1);
strncpy(__appid + MAX_OSP_PKGID + 1, execname, size);
__appid[size + MAX_OSP_PKGID + 1] = '\0';