summaryrefslogtreecommitdiff
path: root/tools/common.gypi
diff options
context:
space:
mode:
authorThomas Shinnick <tshinnic@gmail.com>2011-08-13 16:22:52 -0500
committerBen Noordhuis <info@bnoordhuis.nl>2011-08-14 04:10:42 +0200
commita5d90c435cb7af5fafe5b370e412e1b965d24114 (patch)
tree6f5a818d6ccadaf06c9eddfa17093ece5ae70b6f /tools/common.gypi
parentbfc2982f10701651c2fda92a9be051d89b0f99f4 (diff)
downloadnode-a5d90c435cb7af5fafe5b370e412e1b965d24114.tar.gz
path.js: correct three harmless .length typos
lib/path.js routines normalizeArray() and resolve() have for loops that count down from end of an array. The loop indexes are initialized using "array.length" rather than "array.length-1". The initial array element accessed is always beyond the end of array and the value is 'undefined'. Strangely, code exists that acts to ignore undefined values so that the typos are unnoticeable. Existing tests emit no errors either before or after changing to "length-1". Tests _do_ start failing at "length-2". (Actually it is node that starts to fail at "length-2" - that's a valid enough test...)
Diffstat (limited to 'tools/common.gypi')
0 files changed, 0 insertions, 0 deletions