-
-
Notifications
You must be signed in to change notification settings - Fork 743
RID causes native structures to be misaligned #1956
Copy link
Copy link
Closed
Labels
bugThis has been identified as a bugThis has been identified as a bug
Description
Godot version
c2fe519aa640991b7197008b2793dc2e18c71d77 (there are some custom changes but this is a compile time bug)
godot-cpp version
System information
Linux, compiling for wasm32
Issue description
#include <godot_cpp/classes/glyph.hpp>
The RID field in godot::Glyph is aligned incorrectly.
Steps to reproduce
A correctly laid out struct would be this, or changing RID to be aligned properly in general:
struct Glyph {
int start = -1;
int end = -1;
uint8_t count = 0;
uint8_t repeat = 1;
uint16_t flags = 0;
float x_off = 0.f;
float y_off = 0.f;
float advance = 0.f;
alignas(uint64_t) RID font_rid;
int font_size = 0;
int32_t index = 0;
int span_index = -1;
};
Minimal reproduction project
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis has been identified as a bugThis has been identified as a bug