summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--parser.l5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c1166de..328f6452 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-12-09 Kaz Kylheku <kkylheku@gmail.com>
+ * parser.l (YYINPUT): Fix signed/unsigned comparison.
+
+2009-12-09 Kaz Kylheku <kkylheku@gmail.com>
+
* hash.c (sethash): New function.
* hash.h (sethash): Declared.
diff --git a/parser.l b/parser.l
index 8ed85887..bd7d9595 100644
--- a/parser.l
+++ b/parser.l
@@ -45,8 +45,9 @@
#define YY_INPUT(buf, result, max_size) \
do { \
val c = nil; \
- int n, ch = '*'; \
- for (n = 0; n < max_size && \
+ size_t n; \
+ int ch = '*'; \
+ for (n = 0; n < (size_t) max_size && \
(c = get_byte(yyin_stream)) && \
(ch = c_num(c)) != '\n'; ++n) \
buf[n] = (char) ch; \