From 6ee561e821442d58b00fc62ce70d46de126bd8dc Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 26 Aug 2015 20:41:00 +0300 Subject: [PATCH] Fix calculation of concatenation hash. JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com --- jerry-core/ecma/base/ecma-helpers-string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jerry-core/ecma/base/ecma-helpers-string.cpp b/jerry-core/ecma/base/ecma-helpers-string.cpp index 1e52a017d..cb34a39ae 100644 --- a/jerry-core/ecma/base/ecma-helpers-string.cpp +++ b/jerry-core/ecma/base/ecma-helpers-string.cpp @@ -650,7 +650,7 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */ { lit_utf8_size_t buffer_size = ecma_string_get_size (string2_p); MEM_DEFINE_LOCAL_ARRAY (utf8_str_p, buffer_size, lit_utf8_byte_t); - ecma_string_to_utf8_string (string_desc_p, utf8_str_p, (ssize_t) buffer_size); + ecma_string_to_utf8_string (string2_p, utf8_str_p, (ssize_t) buffer_size); string_desc_p->hash = lit_utf8_string_hash_combine (string1_p->hash, utf8_str_p, buffer_size); MEM_FINALIZE_LOCAL_ARRAY (utf8_str_p); }