Fix runaway comment bug (finally!)

This commit is contained in:
Neale Pickett 2011-06-30 09:02:46 -06:00
parent 4478c14434
commit 1463bd2a3a
2 changed files with 7 additions and 4 deletions

View File

@ -1,2 +0,0 @@
50 0 0 1
70 0 50 0

9
forf.c
View File

@ -586,8 +586,13 @@ forf_parse_stream(struct forf_env *env,
/* Handle comments */
if (comment) {
if (')' == c) {
comment = 0;
switch (c) {
case EOF:
env->error = forf_error_parse;
return pos;
case ')':
comment = 0;
break;
}
continue;
}