Skip to content

Commit

Permalink
fix chugin directory scan skipping over first entry
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Nov 20, 2024
1 parent 468d0e3 commit 01efb5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/chuck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 2 additions & 3 deletions src/core/chuck_compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 01efb5a

Please sign in to comment.