Attempt To Fix Rare Segfault

This commit is contained in:
TheBrokenRail 2024-06-15 10:18:41 -04:00
parent 8249a305df
commit 6098f57b03

View File

@ -69,7 +69,7 @@ export class Method {
const currentOverwriteName = '__current_overwrite_for_' + name;
const thunkName = '__overwrite_thunk_for_' + name;
if (code) {
out += `static ${functionType} ${currentOverwriteName};\n`;
out += `static ${functionType} &${currentOverwriteName} = *new ${functionType};\n`;
out += `static ${formatType(this.returnType)}${thunkName}${this.args} {\n`;
out += `${INDENT}${this.returnType.trim() === 'void' ? '' : 'return '}${currentOverwriteName}(${getArgNames(this.args).join(', ')});\n`;
out += `}\n`;