From 2190d0e99acd565df1244212f7b33909b604aa3a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 12 Sep 2012 15:25:17 -0600 Subject: [PATCH] fix reads of out-of-bounds values in tokenizer.h --- src/tokenizer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tokenizer.h b/src/tokenizer.h index 23b7788232..5699227c74 100644 --- a/src/tokenizer.h +++ b/src/tokenizer.h @@ -32,13 +32,13 @@ class Tokenizer { { } bool hasMore() { - while (*s == delimiter and s != limit) ++s; - return *s != 0 and s != limit; + while (s != limit and *s == delimiter) ++s; + return s != limit and *s != 0; } Token next() { const char* p = s; - while (*s and *s != delimiter and s != limit) ++s; + while (s != limit and *s and *s != delimiter) ++s; return Token(p, s - p); }