mirror of https://github.com/lukechilds/node.git
Browse Source
Return -1 in `Buffer.lastIndexOf` if the needle is longer than the haystack. The previous check only tested the corresponding condition for forward searches. This applies only to Node.js v6, as `lastIndexOf` was added in it. Fixes: https://github.com/nodejs/node/issues/6510 PR-URL: https://github.com/nodejs/node/pull/6511 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>process-exit-stdio-flushing
Anna Henningsen
9 years ago
2 changed files with 27 additions and 2 deletions
Loading…
Reference in new issue