Restructed copy to avoid pointer artithmetic when only single float is being used to avoid Coverity reported defect.
This commit is contained in:
parent
04d387eecf
commit
a185c2778f
@ -314,8 +314,8 @@ track_eval_linear(Lib3dsTrack *track, float *value, float t) {
|
||||
|
||||
assert(track);
|
||||
if (!track->nkeys) {
|
||||
int i;
|
||||
for (i = 0; i < track->type; ++i) value[i] = 0.0f;
|
||||
if (track->type==LIB3DS_TRACK_FLOAT) { *value = 0.0f; }
|
||||
else { for (int i = 0; i < track->type; ++i) value[i] = 0.0f; }
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user