From: 조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 Date: Wed, 12 Aug 2020 01:51:59 +0000 (+0900) Subject: Fixed the wrong base addr being used (#267) X-Git-Tag: accepted/tizen/unified/20200812.143852^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0107bade2f0ec6797c61f646213bbe8081c1787;p=platform%2Fcore%2Fdotnet%2Flauncher.git Fixed the wrong base addr being used (#267) A pointer of a temporally created string object is put into a vector in the "if" statement. So, wrong value is set for /BaseAddress option. --- diff --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc index 594fe3a..fe1ce7b 100644 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@ -337,9 +337,11 @@ static ni_error_e crossgen(const std::string& dllPath, const std::string& appPat } #ifdef UNIQUE_DEFAULT_BASE_ADDR_SUPPORT + char baseAddrString[11] = {0}; if (baseAddr != 0) { argv.push_back("/BaseAddress"); - argv.push_back(std::to_string(baseAddr).c_str()); + snprintf(baseAddrString, 11, "0x%08x", baseAddr); + argv.push_back(baseAddrString); } #endif