Skip to content
Snippets Groups Projects
Commit b4d3ee3b authored by Drake Arconis's avatar Drake Arconis
Browse files

Fix some coverity buggles

parent 482072ce
No related branches found
No related tags found
No related merge requests found
......@@ -307,7 +307,11 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
//----------------------------------------------------------------
// File Header (seek past it)
//----------------------------------------------------------------
fseek(fp, 24, SEEK_SET);
if (fseek(fp, 24, SEEK_SET) != 0)
{
LL_ERRS() << "can't seek past header from " << fileName << LL_ENDL;
return FALSE;
}
//----------------------------------------------------------------
// HasWeights
......@@ -605,7 +609,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
//-------------------------------------------------------------------------
char morphName[64+1];
morphName[sizeof(morphName)-1] = '\0'; // ensure nul-termination
while(fread(&morphName, sizeof(char), 64, fp) == 64)
while(fread(morphName, sizeof(char), 64, fp) == 64)
{
if (!strcmp(morphName, "End Morphs"))
{
......
......@@ -460,7 +460,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
// calculate vergence
F32 interocular_dist = (mLeftEyeState->getJoint()->getWorldPosition() - mRightEyeState->getJoint()->getWorldPosition()).magVec();
vergence = -atan2((interocular_dist / 2.f), lookAtDistance);
llclamp(vergence, -F_PI_BY_TWO, 0.f);
vergence = llclamp(vergence, -F_PI_BY_TWO, 0.f);
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment