summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-02-19 09:32:45 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2013-02-19 09:32:45 -0800
commit0852333900967cfa6569ee2765ce4952e278b6af (patch)
tree497432008eb32806c13479936784d850b8f3e7c5 /src
parent74bbdb3dc0df74e5fa3e4398b10f3712336faaf6 (diff)
parente8de677338cb470dc1d3927942f014a8eff168f4 (diff)
downloadmruby-0852333900967cfa6569ee2765ce4952e278b6af.tar.gz
mruby-0852333900967cfa6569ee2765ce4952e278b6af.zip
Merge pull request #861 from cremno/regexp-parser-bugfix
regexp parsing bug if unknown option is used
Diffstat (limited to 'src')
-rw-r--r--src/parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index 3f9e91b69..365bc5f18 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3462,9 +3462,8 @@ parse_string(parser_state *p, int term)
pushback(p, c);
if (toklen(p)) {
char msg[128];
- free(s);
tokfix(p);
- snprintf(msg, sizeof(msg), "unknown regexp option %s - %s",
+ snprintf(msg, sizeof(msg), "unknown regexp option%s - %s",
toklen(p) > 1 ? "s" : "", tok(p));
yyerror(p, msg);
}