BUG: Fix operator precedence error in cmELF

When attempting to load the RPATH out of a non-ELF file cmELF would
crash because the check for a valid file was done with in correct
operator precedence.  See bug#7392.
This commit is contained in:
Brad King 2008-08-04 09:38:38 -04:00
parent acd9e9e5e9
commit 0c20967a6b
1 changed files with 4 additions and 4 deletions

View File

@ -884,8 +884,8 @@ cmELF::StringEntry const* cmELF::GetSOName()
cmELF::StringEntry const* cmELF::GetRPath()
{
if(this->Valid() &&
this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)
(this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary))
{
return this->Internal->GetRPath();
}
@ -899,8 +899,8 @@ cmELF::StringEntry const* cmELF::GetRPath()
cmELF::StringEntry const* cmELF::GetRunPath()
{
if(this->Valid() &&
this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)
(this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary))
{
return this->Internal->GetRunPath();
}