X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/93a3786624b2768d89bfa27e46598dc64e2fb70a..4be4e30906bcb8ee30b4d189205cb70bad6707ce:/runtime/JSStringJoiner.cpp diff --git a/runtime/JSStringJoiner.cpp b/runtime/JSStringJoiner.cpp index 7e20d21..b6461c7 100644 --- a/runtime/JSStringJoiner.cpp +++ b/runtime/JSStringJoiner.cpp @@ -102,13 +102,13 @@ JSValue JSStringJoiner::join(ExecState* exec) if (!m_strings.size()) return jsEmptyString(exec); - Checked separatorLength = m_separator.length(); + Checked separatorLength = m_separator.length(); // FIXME: add special cases of joinStrings() for (separatorLength == 0) and (separatorLength == 1). ASSERT(m_strings.size() > 0); - Checked totalSeparactorsLength = separatorLength * (m_strings.size() - 1); - Checked outputStringSize = totalSeparactorsLength + m_accumulatedStringsLength; + Checked totalSeparactorsLength = separatorLength * (m_strings.size() - 1); + Checked outputStringSize = totalSeparactorsLength + m_accumulatedStringsLength; - size_t finalSize; + unsigned finalSize; if (outputStringSize.safeGet(finalSize) == CheckedState::DidOverflow) return throwOutOfMemoryError(exec);