src: convert BE-utf16-string to LE before search
authorKarl Skomski <karl@skomski.com>
Fri, 9 Oct 2015 16:09:52 +0000 (18:09 +0200)
committerJames M Snell <jasnell@gmail.com>
Sat, 10 Oct 2015 17:20:18 +0000 (10:20 -0700)
commit589287b2e380653c6781f9530f102e17cd6327e4
tree5774009e9a1ab7d03e12df8ee09920a3fcac8ef8
parent2314378f0689394e0b0ad7417dc2d54c875b997c
src: convert BE-utf16-string to LE before search

On Big Endian platforms v8 strings are need to converted
to Little Endian before searching in utf16le buffer

Fixes: https://github.com/nodejs/node/issues/3283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/3295
src/node_buffer.cc