summaryrefslogtreecommitdiff
path: root/source/kit/file.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-02-29 00:51:42 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-02-29 00:51:42 +0100
commit2dab66694bb72ee222a44c49c669e9f5adc024f0 (patch)
tree53e89f2cdab40292801da8fe8fb0a511d39377bb /source/kit/file.c
parent0948d02a5a3abae918fa8f5fe1587e19cd0ada41 (diff)
downloadsaw-2dab66694bb72ee222a44c49c669e9f5adc024f0.zip
Load audio file with miniaudio instead of dr_libs; Fix null dereference when loading empty sampler
Diffstat (limited to 'source/kit/file.c')
-rw-r--r--source/kit/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/kit/file.c b/source/kit/file.c
index 76d3249..3eafc70 100644
--- a/source/kit/file.c
+++ b/source/kit/file.c
@@ -465,7 +465,7 @@ kit_path_list_t kit_folder_enum(kit_str_t path,
i64 n = result.files.size;
DA_RESIZE(result.files, n + 1);
if (result.files.size != n + 1) {
- result.status = KIT_ERROR_BAD_ALLOC;
+ result.status = KIT_ERROR_OUT_OF_MEMORY;
break;
}
@@ -473,7 +473,7 @@ kit_path_list_t kit_folder_enum(kit_str_t path,
DA_INIT(result.files.values[n], size, alloc);
if (result.files.values[n].size != size) {
DA_RESIZE(result.files, n);
- result.status = KIT_ERROR_BAD_ALLOC;
+ result.status = KIT_ERROR_OUT_OF_MEMORY;
break;
}
@@ -499,7 +499,7 @@ kit_path_list_t kit_folder_enum(kit_str_t path,
i64 n = result.files.size;
DA_RESIZE(result.files, n + 1);
if (result.files.size != n + 1) {
- result.status = KIT_ERROR_BAD_ALLOC;
+ result.status = KIT_ERROR_OUT_OF_MEMORY;
break;
}
@@ -507,7 +507,7 @@ kit_path_list_t kit_folder_enum(kit_str_t path,
DA_INIT(result.files.values[n], size, alloc);
if (result.files.values[n].size != size) {
DA_RESIZE(result.files, n);
- result.status = KIT_ERROR_BAD_ALLOC;
+ result.status = KIT_ERROR_OUT_OF_MEMORY;
break;
}