From cccebda66568fa8bebcf57eeb01e086a2185721a Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Mon, 24 Sep 2012 15:47:03 -0700 Subject: [PATCH] Stop when position equals the start position (not always 0) --- native/v8_extensions/onig_reg_exp.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/v8_extensions/onig_reg_exp.mm b/native/v8_extensions/onig_reg_exp.mm index 910567425..3f1f6ab61 100644 --- a/native/v8_extensions/onig_reg_exp.mm +++ b/native/v8_extensions/onig_reg_exp.mm @@ -106,7 +106,7 @@ bool OnigRegExp::Execute(const CefString& name, if (bestIndex == -1 || captureIndices->GetValue(1)->GetIntValue() < captureIndicesForBestIndex->GetValue(1)->GetIntValue()) { bestIndex = i; captureIndicesForBestIndex = captureIndices; - if (captureIndices->GetValue(1)->GetIntValue() == 0) break; // If the match starts at 0, just use it! + if (captureIndices->GetValue(1)->GetIntValue() == index->GetIntValue()) break; // If the match starts at 0, just use it! } }