From 6534e0fc55d18fc9011576b4c63cfbd45ce18649 Mon Sep 17 00:00:00 2001 From: jez Date: Sat, 14 May 2011 17:40:45 -0400 Subject: Add comment about caching hintString.length. Done with reference to commit bcf01ad7ec356c62cb1f8c0efcd83cd26c2d8a86. --- linkHints.js | 1 + 1 file changed, 1 insertion(+) diff --git a/linkHints.js b/linkHints.js index f20a8e8e..f9a60857 100644 --- a/linkHints.js +++ b/linkHints.js @@ -347,6 +347,7 @@ var alphabetHints = { } while (number > 0); // Pad the hint string we're returning so that it matches numHintDigits. + // Note: the loop body changes hintString.length, so the original length must be cached! var hintStringLength = hintString.length; for (var i = 0; i < numHintDigits - hintStringLength; i++) hintString.unshift(settings.get('linkHintCharacters')[0]); -- cgit v1.2.3