aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/runtime/default_temp_allocator_arena.odin1
-rw-r--r--src/types.cpp3
-rw-r--r--vendor/sdl2/sdl_messagebox.odin2
3 files changed, 5 insertions, 1 deletions
diff --git a/base/runtime/default_temp_allocator_arena.odin b/base/runtime/default_temp_allocator_arena.odin
index 8f4821b4a..eafaf9fbe 100644
--- a/base/runtime/default_temp_allocator_arena.odin
+++ b/base/runtime/default_temp_allocator_arena.odin
@@ -235,6 +235,7 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
if start < old_end && old_end == block.used && new_end <= block.capacity {
// grow data in-place, adjusting next allocation
block.used = uint(new_end)
+ arena.total_used = uint(new_end)
data = block.base[start:new_end]
// sanitizer.address_unpoison(data)
return
diff --git a/src/types.cpp b/src/types.cpp
index eb20b8edf..18e3b56ac 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -4278,6 +4278,9 @@ gb_internal i64 *type_set_offsets_of(Slice<Entity *> const &fields, bool is_pack
gb_internal bool type_set_offsets(Type *t) {
t = base_type(t);
if (t->kind == Type_Struct) {
+ if (t->Struct.are_offsets_being_processed.load()) {
+ return true;
+ }
MUTEX_GUARD(&t->Struct.offset_mutex);
if (!t->Struct.are_offsets_set) {
t->Struct.are_offsets_being_processed.store(true);
diff --git a/vendor/sdl2/sdl_messagebox.odin b/vendor/sdl2/sdl_messagebox.odin
index edd8422e0..5211affd8 100644
--- a/vendor/sdl2/sdl_messagebox.odin
+++ b/vendor/sdl2/sdl_messagebox.odin
@@ -66,7 +66,7 @@ MessageBoxData :: struct {
message: cstring, /**< UTF-8 message text */
numbuttons: c.int,
- buttons: ^MessageBoxButtonData,
+ buttons: [^]MessageBoxButtonData,
colorScheme: ^MessageBoxColorScheme, /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
}