mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 14:18:47 +00:00
Fix logic bug in core/encoding/ini/ini.odin
The load_map_from_path had incorrect logic where it would return false for ok when err was equal to nil and true when there was an error.
This commit is contained in:
@@ -121,7 +121,7 @@ load_map_from_path :: proc(path: string, allocator: runtime.Allocator, options :
|
|||||||
data := os.read_entire_file(path, allocator) or_return
|
data := os.read_entire_file(path, allocator) or_return
|
||||||
defer delete(data, allocator)
|
defer delete(data, allocator)
|
||||||
m, err = load_map_from_string(string(data), allocator, options)
|
m, err = load_map_from_string(string(data), allocator, options)
|
||||||
ok = err != nil
|
ok = err == nil
|
||||||
defer if !ok {
|
defer if !ok {
|
||||||
delete_map(m)
|
delete_map(m)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user