chiark / gitweb /
[PATCH] bugfix for local user
[elogind.git] / namedev.c
index 2ebf276f6b9141e081ad849c7a160061174620aa..ed8d6c1808bf3c747e4b0a14be5a49f99839a2cc 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -198,7 +198,7 @@ static int get_format_len(char **str)
 
        if (isdigit(*str[0])) {
                num = (int) strtoul(*str, &tail, 10);
-               if (tail != NULL) {
+               if (num > 0) {
                        *str = tail;
                        dbg("format length=%i", num);
                        return num;