diff --git a/src/opt/opt_parse.cpp b/src/opt/opt_parse.cpp index 29e8a604c0b..78ce8bd8503 100644 --- a/src/opt/opt_parse.cpp +++ b/src/opt/opt_parse.cpp @@ -69,7 +69,7 @@ class opt_stream_buffer { bool opt_stream_buffer::parse_token(char const* token) { skip_whitespace(); char const* t = token; - while (ch() == *t) { + while (*t && ch() == *t) { next(); ++t; }