summaryrefslogtreecommitdiff
path: root/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'unit.c')
-rw-r--r--unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unit.c b/unit.c
index e6e5574312..e8d61c853c 100644
--- a/unit.c
+++ b/unit.c
@@ -62,6 +62,9 @@ bool unit_name_is_valid(const char *n) {
if (!(e = strrchr(n, '.')))
return false;
+ if (e == n)
+ return false;
+
for (i = n; i < e; i++)
if (!strchr(VALID_CHARS, *i))
return false;