Commit 2eda2d60 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

src: fix external string length calculation

Make StringBytes::GetExternalParts() return the byte length for two-byte
strings, not the character length.  Its callers operate on bytes, not
characters.

This also fixes StringBytes::Size() reporting only half of the actual
number of bytes for external two-byte strings.

PR-URL: https://github.com/iojs/io.js/pull/1042


Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent e2fb733a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment