summaryrefslogtreecommitdiffstats
path: root/ctxopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctxopt.c')
-rw-r--r--ctxopt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctxopt.c b/ctxopt.c
index 8fa9843..7b25f35 100644
--- a/ctxopt.c
+++ b/ctxopt.c
@@ -7,6 +7,7 @@
/* ################################################################### */
#include <errno.h>
+#include <stddef.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1270,7 +1271,7 @@ get_word(char *str, char *buf, size_t len)
/* Get the word. */
/*"""""""""""""" */
- while (*s && !isspace(*s) && s - str < len)
+ while (*s && !isspace(*s) && s - str < (ptrdiff_t)len)
s++;
strncpy(buf, str, s - str);