X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fcommon%2Fvfs.c;fp=tools%2Fquake3%2Fcommon%2Fvfs.c;h=2e7445882cc8427190bb7cf2849836a9cdaa0dc0;hb=66d12fc2373b05233aa29ee097efe820f05a8520;hp=b7a9bbbceaff49259f779177a6a9f11102c84c62;hpb=eef39952025db1375e33b6e314692ac76badb93c;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/common/vfs.c b/tools/quake3/common/vfs.c index b7a9bbbc..2e744588 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -247,7 +247,7 @@ void vfsInitDirectory( const char *path ){ // lists all .shader files -void vfsListShaderFiles( char list[512][64], int *num ){ +void vfsListShaderFiles( char* list, int *num ){ //char filename[PATH_MAX]; char *dirlist; GDir *dir; @@ -275,9 +275,9 @@ void vfsListShaderFiles( char list[512][64], int *num ){ } for ( k = 0; k < *num; k++ ){ - if ( !stricmp( list[k], dirlist ) ) goto shISdouplicate; + if ( !stricmp( list + k*65, dirlist ) ) goto shISdouplicate; } - strcpy( list[*num], dirlist ); + strcpy( list + (*num)*65, dirlist ); (*num)++; shISdouplicate: g_free( dirlist ); @@ -302,9 +302,9 @@ shISdouplicate: ext++; for ( k = 0; k < *num; k++ ){ - if ( !stricmp( list[k], ext ) ) goto shISdouplicate2; + if ( !stricmp( list + k*65, ext ) ) goto shISdouplicate2; } - strcpy( list[*num], ext ); + strcpy( list + (*num)*65, ext ); (*num)++; shISdouplicate2: continue;