From 3f1bf755c99bacf1f02a1d1b04447847c85cbf74 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 9 Jan 2020 17:24:53 +0900 Subject: [PATCH] Fix build error due to change of toolchain Change-Id: I9440feaaa4f60b8eb8daac03640631627efbf5af Signed-off-by: Jihoon Kim --- scl/gwes/efl/sclgraphics-efl.cpp | 4 ++-- xml2binary/include/resource_storage_impl.h | 2 +- xml2binary/xml2dat.cpp | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scl/gwes/efl/sclgraphics-efl.cpp b/scl/gwes/efl/sclgraphics-efl.cpp index 1cc88cb..da54147 100644 --- a/scl/gwes/efl/sclgraphics-efl.cpp +++ b/scl/gwes/efl/sclgraphics-efl.cpp @@ -766,8 +766,8 @@ CSCLGraphicsImplEfl::draw_text(sclwindow window, const scldrawctx draw_ctx, cons padding_y = 0; } - sclchar strStyle[128]; - snprintf(strStyle, 128, + sclchar strStyle[256]; + snprintf(strStyle, 256, "DEFAULT='font=%s font_size=%d align=%s color=#%02X%02X%02X%02X wrap=word left_margin=%d right_margin=%d'", font_info.font_name, font_info.font_size, (((int)align % 3) == 1) ? "center" : ((((int)align % 3) == 2) ? "right" : "left"), diff --git a/xml2binary/include/resource_storage_impl.h b/xml2binary/include/resource_storage_impl.h index ddc9b89..d4d10fc 100644 --- a/xml2binary/include/resource_storage_impl.h +++ b/xml2binary/include/resource_storage_impl.h @@ -60,7 +60,7 @@ put(const char* str) { *(m_storage + m_size) = len; m_size += 1; - strncpy(m_storage + m_size, str, len); + memcpy(m_storage + m_size, str, len); m_size += len; /*Add '\0' to the end*/ diff --git a/xml2binary/xml2dat.cpp b/xml2binary/xml2dat.cpp index a5e3888..91635f4 100644 --- a/xml2binary/xml2dat.cpp +++ b/xml2binary/xml2dat.cpp @@ -100,6 +100,10 @@ int main(const int argc, char* argv[]) { perror(metadata_path); return -1; } + + if (!xml_bin_dir) + return -1; + MetaData_Handler md_handler(metadata_path); char bin_file[_POSIX_PATH_MAX] = {0}; -- 2.7.4