From 450dcb1af3bb156ab584174effa0d82995e8284c Mon Sep 17 00:00:00 2001 From: HeroesOfBalkan Date: Sun, 12 Jan 2025 15:27:32 +0100 Subject: [PATCH] Fix bug returning success when NULL is passed & typo corrected in a comment --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 74e26654..25a0f368 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -57793,7 +57793,7 @@ MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, m ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSourceBase == NULL) { - return MA_SUCCESS; + return MA_INVALID_ARGS; } if (pDataSourceBase->vtable->onSeek == NULL) { @@ -57801,7 +57801,7 @@ MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, m } if (frameIndex > pDataSourceBase->rangeEndInFrames) { - return MA_INVALID_OPERATION; /* Trying to seek to far forward. */ + return MA_INVALID_OPERATION; /* Trying to seek too far forward. */ } MA_ASSERT(pDataSourceBase->vtable != NULL);