diff --git a/Dockerfile b/Dockerfile index 1fcc684..bbd56ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM wiiuenv/devkitppc:20211106 +FROM wiiuenv/devkitppc:20220728 WORKDIR project \ No newline at end of file diff --git a/source/main.cpp b/source/main.cpp index 2c53852..30f3478 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -88,8 +88,11 @@ bool writeFileContent(const std::string &path, const std::string &content) { } extern "C" void __fini(); +extern "C" void __init_wut_malloc(); int main(int argc, char **argv) { + // We need to call __init_wut_malloc somewhere so wut_malloc will be used for the memory allocation. + __init_wut_malloc(); initLogging(); if (IOS_Open((char *) ("/dev/iosuhax"), static_cast(0)) >= 0) { diff --git a/source/utils/utils.h b/source/utils/utils.h index a71f4f9..f334596 100644 --- a/source/utils/utils.h +++ b/source/utils/utils.h @@ -7,7 +7,7 @@ std::unique_ptr make_unique_nothrow(Args &&...args) noexcept(noexcept(T(std:: } template -inline typename std::_MakeUniq::__array make_unique_nothrow(size_t num) noexcept { +inline typename std::unique_ptr make_unique_nothrow(size_t num) noexcept { return std::unique_ptr(new (std::nothrow) std::remove_extent_t[num]()); }