• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión54b92759ddd4ff52ed4f302354414b486eef938b (tree)
Tiempo2009-03-30 00:08:00
Autorhenoheno <henoheno>
Commiterhenoheno

Log Message

generate_trie_regex(): No need to check $char itself

Cambiar Resumen

Diferencia incremental

--- a/lib/func.php
+++ b/lib/func.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: func.php,v 1.99 2009/03/29 03:04:07 henoheno Exp $
3+// $Id: func.php,v 1.100 2009/03/29 15:08:00 henoheno Exp $
44 // Copyright (C)
55 // 2002-2007,2009 PukiWiki Developers Team
66 // 2001-2002 Originally written by yu-ji
@@ -658,8 +658,9 @@ function generate_trie_regex(& $array, $_offset = 0, $_sentry = NULL, $_pos = 0)
658658
659659 // How many continuous keys have the same letter
660660 // at the same position?
661- for ($i = $index; $i < $_sentry; $i++)
661+ for ($i = $index + 1; $i < $_sentry; $i++) {
662662 if (mb_substr($array[$i], $_pos, 1) != $char) break;
663+ }
663664
664665 if ($index < ($i - 1)) {
665666 // Some more keys found