« Bugzilla Issues Index
#2615 — 21.2.5.7 RegExp.prototype.replace: Off by one error when processing capturing groups
- bug_id:
2615
- creation_ts:
2014-04-10 05:35:00 -0700
- short_desc:
21.2.5.7 RegExp.prototype.replace: Off by one error when processing capturing groups
- delta_ts:
2014-04-29 22:39:32 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 23: April 5, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
7642
- comment_count:
0
- who:
André Bargull
- bug_when:
2014-04-10 05:35:32 -0700
21.2.5.7 RegExp.prototype.replace ( string, replaceValue ), steps 16.d.vii and 16.d.ix
Change "Let n be 0" to "Let n be 1" in step 16.d.vii and change the loop condition from "n < nCaptures" to "n <= nCaptures".
(The off by one error is in step 16.d.ix.1, it needs to be ToString(n + 1) instead of ToString(n), but starting from n=1 to n=nCaptures makes it easier to understand the algorithm.)
- commentid:
7726
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-04-14 13:05:24 -0700
fixed in rev24 editor's draft
- commentid:
8021
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-04-29 22:39:32 -0700
fixed in rev24