From 01efb5a13f7fd318479fb86469ca9a439d9f1a28 Mon Sep 17 00:00:00 2001 From: Ge Wang Date: Wed, 20 Nov 2024 15:08:48 -0800 Subject: [PATCH] fix chugin directory scan skipping over first entry --- VERSIONS | 2 ++ src/core/chuck.cpp | 2 +- src/core/chuck_compile.cpp | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VERSIONS b/VERSIONS index 3221f1caf..d5236d01c 100644 --- a/VERSIONS +++ b/VERSIONS @@ -24,6 +24,8 @@ new ChuGL v0.2.4 (see ChuGL release notes below) internally, string operations now are appropriately handled by the operator overloading mechanism (fixed) < <= > >= operators for strings +(fixed) an issue chugin system auto-load and --chugin-probe was skipping\ + over the first element when scanning directories (fixed) vec2/vec3/vec4 implicit cast logic for +=> and -=> operations (previously, this would cause a crash in some cases) (fixed) vec2/vec3/vec4 function call from literal (non-variable) value diff --git a/src/core/chuck.cpp b/src/core/chuck.cpp index 355bf85bd..5e5c8a2d3 100644 --- a/src/core/chuck.cpp +++ b/src/core/chuck.cpp @@ -891,7 +891,7 @@ void ChucK::probeChugins() // check if( ck_libs_to_preload.size() == 0 ) - EM_log( CK_LOG_INFO, "(no auto-load chuck files found)" ); + EM_log( CK_LOG_INFO, "(no chuck files found)" ); // pop log EM_poplog(); diff --git a/src/core/chuck_compile.cpp b/src/core/chuck_compile.cpp index 8c7454c38..56a9d4ce9 100644 --- a/src/core/chuck_compile.cpp +++ b/src/core/chuck_compile.cpp @@ -1446,10 +1446,9 @@ t_CKBOOL scan_external_modules_in_directory( const string & directory, // cannot open if( !dir ) return FALSE; - // do first read | 1.5.0.0 (ge + eito) #chunreal - struct dirent * de = readdir( dir ); // while( (de = readdir(dir)) ) <- UE5 forces us to not do this - for( de = readdir(dir); de != NULL; de = readdir(dir) ) + // iterate over directory entries | 1.5.0.0 (ge + eito) #chunreal + for( struct dirent * de = readdir( dir ); de != NULL; de = readdir(dir) ) { t_CKBOOL is_regular = false; t_CKBOOL is_directory = false;