From a1513863430a24ca01f1e3d30f38348abbff2c06 Mon Sep 17 00:00:00 2001 From: jianhan-he <41508406+jianhan-he@users.noreply.github.com> Date: Sat, 29 Sep 2018 13:14:21 +0800 Subject: [PATCH] [core] fix use c++_static compile error on Android (#1593) --- .../Source/android/jsengine/multiprocess/WeexJSConnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp b/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp index d2a609bee9..f7cbd80e6c 100644 --- a/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp +++ b/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp @@ -117,7 +117,7 @@ WeexJSConnection::WeexJSConnection() if (checkDirOrFileIsLink(SoUtils::crash_file_path())) { std::string tmp = SoUtils::crash_file_path(); size_t length = tmp.length(); - char buf[length]; + char *buf = new char[length]; memset(buf, 0, length); if (!getDirOrFileLink(SoUtils::crash_file_path(), buf, length)) { LOGE("getDirOrFileLink filePath(%s) error\n", SoUtils::crash_file_path()); @@ -125,6 +125,7 @@ WeexJSConnection::WeexJSConnection() } else { g_crashFileName = buf; } + delete []buf; } else { g_crashFileName = SoUtils::crash_file_path(); }