diff options
| author | Ronald <ronald1985@tutamail.com> | 2024-07-14 11:48:34 +0100 |
|---|---|---|
| committer | Ronald <ronald1985@tutamail.com> | 2024-07-14 11:48:34 +0100 |
| commit | 7e4e3429d7fa1dd3bfa4b8336f8b844a9a9f8ca7 (patch) | |
| tree | 7acf1e5148bf17f373538231e3d6c7ca8afda561 | |
| parent | edc793d7c123a38826860ef72684308902a7012c (diff) | |
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.
| -rw-r--r-- | core/encoding/ini/ini.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/encoding/ini/ini.odin b/core/encoding/ini/ini.odin index eb0ad9e7c..91a1adcf7 100644 --- a/core/encoding/ini/ini.odin +++ b/core/encoding/ini/ini.odin @@ -121,7 +121,7 @@ load_map_from_path :: proc(path: string, allocator: runtime.Allocator, options : data := os.read_entire_file(path, allocator) or_return defer delete(data, allocator) m, err = load_map_from_string(string(data), allocator, options) - ok = err != nil + ok = err == nil defer if !ok { delete_map(m) } |