Lerg/extension-imageloader

Crashes on build

Closed this issue · 2 comments

This extension appears to crash on build with the following error message:

/imageloader/src/extension.cpp
	Line 138: non-aggregate type 'dmScript::LuaHBuffer' cannot be initialized with an initializer list
                dmScript::LuaHBuffer lua_buffer = {buffer, true};
                                     ^            ~~~~~~~~~~~~~~

There is also this warning:

/imageloader/include/thread.h
	Line 1322: In file included from upload/imageloader/src/extension.cpp:9:
implicit conversion of NULL constant to 'thread_tls_t' (aka 'unsigned long') [-Wnull-conversion]
            return NULL;
            ~~~~~~ ^~~~
                   0

This can be fixed by changing line 138 of extension.cpp from dmScript::LuaHBuffer lua_buffer = {buffer, true}; to dmScript::LuaHBuffer lua_buffer (buffer, dmScript::OWNER_LUA); This change was shared here: https://forum.defold.com/t/ne-updated-dmscript-luahbuffer-constructor/69931.

I can open a pull request.

The warning is coming from the external library thread.h. It could be changed, but it is trivial.