We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4ac1d3 commit 5fff54aCopy full SHA for 5fff54a
include/wrenbind17/vm.hpp
@@ -114,6 +114,10 @@ namespace wrenbind17 {
114
115
#if WREN_VERSION_NUMBER >= 4000 // >= 0.4.0
116
data->config.reallocateFn = [](void* memory, size_t newSize, void* userData) -> void* {
117
+ if (newSize == 0) {
118
+ std::free(memory);
119
+ return nullptr;
120
+ }
121
return std::realloc(memory, newSize);
122
};
123
data->config.loadModuleFn = [](WrenVM* vm, const char* name) -> WrenLoadModuleResult {
0 commit comments