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.
2 parents 3830fe4 + 05d2ce3 commit fd708f4Copy full SHA for fd708f4
src/godot.cpp
@@ -289,7 +289,7 @@ GDExtensionBool GDExtensionBinding::init(GDExtensionInterfaceGetProcAddress p_ge
289
290
// Make sure we weren't passed the legacy struct.
291
uint32_t *raw_interface = (uint32_t *)(void *)p_get_proc_address;
292
- if (raw_interface[0] == 4 && raw_interface[1] == 0) {
+ if (uintptr_t(p_get_proc_address) % alignof(LegacyGDExtensionInterface) == 0 && raw_interface[0] == 4 && raw_interface[1] == 0) {
293
// Use the legacy interface only to give a nice error.
294
LegacyGDExtensionInterface *legacy_interface = (LegacyGDExtensionInterface *)p_get_proc_address;
295
internal::gdextension_interface_print_error = (GDExtensionInterfacePrintError)legacy_interface->print_error;
0 commit comments