From 92e3d817b3b381f6b2f8c8b1405de6747f6a917f Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Fri, 31 Mar 2023 18:09:47 +0900 Subject: [PATCH] Fix UTC error for TextSpannable FontDescriptionRun is not null-terminate string Change-Id: I5f8704c850f2fb3ad213b54a7a23897efe2cdeb6 Signed-off-by: Eunki, Hong --- .../src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp index 40f51de..36125c5 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -292,7 +292,7 @@ int UtcDaliToolkitTextLabelSetSpannedText_FontSpan(void) const Vector& validFontDescriptionRuns = labelImpl.GetTextController()->GetTextModel()->GetFontDescriptionRuns(); DALI_TEST_EQUALS(validFontDescriptionRuns.Count(), 1u, TEST_LOCATION); - std::string familyName = validFontDescriptionRuns[0].familyName; + std::string familyName = std::string(validFontDescriptionRuns[0].familyName, validFontDescriptionRuns[0].familyLength); DALI_TEST_EQUALS(familyName, "TizenSans", TEST_LOCATION); DALI_TEST_EQUALS(validFontDescriptionRuns[0].size, expectedPointSize, TEST_LOCATION); -- 2.7.4