diff options
author | Thomas Shinnick <tshinnic@gmail.com> | 2011-08-13 16:22:52 -0500 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-08-14 04:10:42 +0200 |
commit | a5d90c435cb7af5fafe5b370e412e1b965d24114 (patch) | |
tree | 6f5a818d6ccadaf06c9eddfa17093ece5ae70b6f /tools/common.gypi | |
parent | bfc2982f10701651c2fda92a9be051d89b0f99f4 (diff) | |
download | node-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