| Index: src/regexp.js
|
| diff --git a/src/regexp.js b/src/regexp.js
|
| index dc1b0429f7094c5c4fe80d5af5515c8fd2e5fb91..69cf136d108e1cd21bc30f445dc3919fe4879700 100644
|
| --- a/src/regexp.js
|
| +++ b/src/regexp.js
|
| @@ -213,7 +213,10 @@ function RegExpExec(string) {
|
| var matchIndices = %_RegExpExec(this, s, i, lastMatchInfo);
|
|
|
| if (matchIndices == null) {
|
| - if (this.global) this.lastIndex = 0;
|
| + if (this.global) {
|
| + this.lastIndex = 0;
|
| + if (lastIndex != 0) return matchIndices;
|
| + }
|
| cache.lastIndex = lastIndex;
|
| cache.regExp = this;
|
| cache.subject = s;
|
|
|