Do index testing before actually accessing the array pointers with it in function tryfit() in newdc/rend/gles/gles.cpp.
Technically only the i<128 checks matter, but moved them all 'forward' in the if statements for consistency.
This commit is contained in:
parent
312835958d
commit
92a237a828
|
@ -749,17 +749,17 @@ void tryfit(float* x,float* y)
|
|||
int rep=1;
|
||||
|
||||
//discard values cliped to 0 or 1
|
||||
if (y[i]==1 && i<128 && y[i+1]==1)
|
||||
if (i<128 && y[i]==1 && y[i+1]==1)
|
||||
continue;
|
||||
|
||||
if (y[i]==0 && i>0 && y[i-1]==0)
|
||||
if (i>0 && y[i]==0 && y[i-1]==0)
|
||||
continue;
|
||||
|
||||
//Add many samples for first and last value (fog-in, fog-out -> important)
|
||||
if (y[i]!=1 && i>0 && y[i-1]==1)
|
||||
if (i>0 && y[i]!=1 && y[i-1]==1)
|
||||
rep=10000;
|
||||
|
||||
if (y[i]!=0 && i<128 && y[i+1]==0)
|
||||
if (i<128 && y[i]!=0 && y[i+1]==0)
|
||||
rep=10000;
|
||||
|
||||
for (int j=0;j<rep;j++)
|
||||
|
|
Loading…
Reference in New Issue