mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Avoid undefined behaviour by allocating with align 1.
The allocation APIs require that the alignment is a power-of-two; meaning 1 is the "I don't care" alignment, not 0.
This commit is contained in:
parent
82e476fd07
commit
b42117fe0c
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ struct User {
|
|||
}
|
||||
|
||||
// FreeType doesn't require any particular alignment for allocations.
|
||||
const FT_ALIGNMENT: usize = 0;
|
||||
const FT_ALIGNMENT: usize = 1;
|
||||
|
||||
extern fn ft_alloc(mem: FT_Memory, req_size: c_long) -> *mut c_void {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue