about summary refs log tree commit diff
path: root/xe.c
diff options
context:
space:
mode:
Diffstat (limited to 'xe.c')
-rw-r--r--xe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xe.c b/xe.c
index 5f93856..12f98fb 100644
--- a/xe.c
+++ b/xe.c
@@ -332,7 +332,7 @@ parse_jobs(char *s)
 	int n;
 
 #ifdef _SC_NPROCESSORS_ONLN
-	if (s[strlen(s) - 1] == 'x') {
+	if (*s && s[strlen(s) - 1] == 'x') {
 		n = (int)sysconf(_SC_NPROCESSORS_ONLN);
 		double d = 0.0;
 		errno = 0;