From 189b4782fb19dae260dcf1893583976463f21e6f Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 3 Mar 2025 20:33:33 +0100 Subject: [PATCH] dynlib: fix initialize_symbols when there is no field for the handle in the struct --- core/dynlib/lib.odin | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/dynlib/lib.odin b/core/dynlib/lib.odin index cd9eed5f8..e6b39be4b 100644 --- a/core/dynlib/lib.odin +++ b/core/dynlib/lib.odin @@ -145,6 +145,11 @@ initialize_symbols :: proc( } } + // No field for it in the struct. + if handle == nil { + handle = load_library(library_path) or_return + } + // Buffer to concatenate the prefix + symbol name. prefixed_symbol_buf: [2048]u8 = ---