Kaydet (Commit) c44af337 authored tarafından Neal Norwitz's avatar Neal Norwitz

Add assertion that we do not blow out newl

üst e7bb9188
...@@ -605,6 +605,7 @@ decode_str(const char *str, struct tok_state *tok) ...@@ -605,6 +605,7 @@ decode_str(const char *str, struct tok_state *tok)
for (s = str;; s++) { for (s = str;; s++) {
if (*s == '\0') break; if (*s == '\0') break;
else if (*s == '\n') { else if (*s == '\n') {
assert(lineno < 2);
newl[lineno] = s; newl[lineno] = s;
lineno++; lineno++;
if (lineno == 2) break; if (lineno == 2) break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment