Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Update load.cpp (#821)
Browse files Browse the repository at this point in the history
* Update load.cpp

* Update load.cpp

Co-authored-by: aivanova5 <ivanova.alyona5@gmail.com>
  • Loading branch information
David P. Chassin and aivanova5 committed Jan 6, 2021
1 parent a34a294 commit 2976c4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gldcore/load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8111,14 +8111,21 @@ STATUS GldLoader::loadall(const char *fname)
{
/* if nothing requested only config files are loaded */
if ( fname == NULL )
{
return SUCCESS;
}

char file[1024] = "";
if ( fname )
{
strcpy(file,fname);
}
char *ext = fname ? strrchr(file,'.') : NULL ;
if ( ext == NULL )
{
output_error("'%s' is not valid", fname);
return FAILED;
}
add_depend(filename,fname);

// python script
Expand Down Expand Up @@ -8192,7 +8199,7 @@ STATUS GldLoader::loadall(const char *fname)

/* handle default extension */
strcpy(filename,file);
if (ext==NULL || ext<file+strlen(file)-5)
if ( ext == NULL || ext < file+strlen(file)-5 )
{
ext = filename+strlen(filename);
strcat(filename,".glm");
Expand Down

0 comments on commit 2976c4f

Please sign in to comment.