Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
31b30715
Commit
31b30715
authored
Oct 02, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed backslash handling in regular expressions.
parent
383de2d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
lex.c
dlls/jscript/lex.c
+4
-2
regexp.js
dlls/jscript/tests/regexp.js
+7
-1
No files found.
dlls/jscript/lex.c
View file @
31b30715
...
...
@@ -709,8 +709,10 @@ literal_t *parse_regexp(parser_ctx_t *ctx)
TRACE
(
"
\n
"
);
re
=
ctx
->
ptr
;
while
(
ctx
->
ptr
<
ctx
->
end
&&
(
*
ctx
->
ptr
!=
'/'
||
*
(
ctx
->
ptr
-
1
)
==
'\\'
))
ctx
->
ptr
++
;
while
(
ctx
->
ptr
<
ctx
->
end
&&
*
ctx
->
ptr
!=
'/'
)
{
if
(
*
ctx
->
ptr
++
==
'\\'
&&
ctx
->
ptr
<
ctx
->
end
)
ctx
->
ptr
++
;
}
if
(
ctx
->
ptr
==
ctx
->
end
)
{
WARN
(
"unexpected end of file
\n
"
);
...
...
dlls/jscript/tests/regexp.js
View file @
31b30715
...
...
@@ -47,10 +47,16 @@ ok(m["1"] === "ab", "m[1] is not \"ab\"");
m
=
"aaabcabc"
.
match
(
/a+b/g
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not
1
"
);
ok
(
m
.
length
===
2
,
"m.length is not
2
"
);
ok
(
m
[
"0"
]
===
"aaab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
m
=
"aaa
\\\\
cabc"
.
match
(
/
\\
/g
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not 2"
);
ok
(
m
[
"0"
]
===
"
\
\"
, "
m
[
0
]
is
not
\
"
\\
\"
"
);
ok
(
m
[
"1"
]
===
"
\
\"
, "
m
[
1
]
is
not
\
"
\\
\"
"
);
m
=
"abcabc"
.
match
(
new
RegExp
(
"ab"
));
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
1
,
"m.length is not 1"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment