diff options
Diffstat (limited to 'swaynag')
-rw-r--r-- | swaynag/swaynag.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c index 87199a74..caa10ccd 100644 --- a/swaynag/swaynag.c +++ b/swaynag/swaynag.c | |||
@@ -132,10 +132,11 @@ static void update_cursor(struct swaynag *swaynag) { | |||
132 | const char *cursor_theme = getenv("XCURSOR_THEME"); | 132 | const char *cursor_theme = getenv("XCURSOR_THEME"); |
133 | unsigned cursor_size = 24; | 133 | unsigned cursor_size = 24; |
134 | const char *env_cursor_size = getenv("XCURSOR_SIZE"); | 134 | const char *env_cursor_size = getenv("XCURSOR_SIZE"); |
135 | if (env_cursor_size) { | 135 | if (env_cursor_size && strlen(env_cursor_size) > 0) { |
136 | errno = 0; | ||
136 | char *end; | 137 | char *end; |
137 | unsigned size = strtoul(env_cursor_size, &end, 10); | 138 | unsigned size = strtoul(env_cursor_size, &end, 10); |
138 | if (!*end) { | 139 | if (!*end && errno == 0) { |
139 | cursor_size = size; | 140 | cursor_size = size; |
140 | } | 141 | } |
141 | } | 142 | } |