diff options
author | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
commit | 2ec55fd974a63b705a4777c256d2222c874fa043 (patch) | |
tree | 48f1fea59ee9fc713a28a9aac3f05b98dc5ae66f /Source/3rdParty/SDL2/src/libm/e_rem_pio2.c | |
parent | c581dfbf1e849f393861d15e82aa6446c0c1c310 (diff) |
*SDL project
Diffstat (limited to 'Source/3rdParty/SDL2/src/libm/e_rem_pio2.c')
-rw-r--r-- | Source/3rdParty/SDL2/src/libm/e_rem_pio2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/3rdParty/SDL2/src/libm/e_rem_pio2.c b/Source/3rdParty/SDL2/src/libm/e_rem_pio2.c index df7c2b8..5e055d6 100644 --- a/Source/3rdParty/SDL2/src/libm/e_rem_pio2.c +++ b/Source/3rdParty/SDL2/src/libm/e_rem_pio2.c @@ -154,7 +154,7 @@ int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y) } tx[2] = z; nx = 3; - while(tx[nx-1]==zero) nx--; /* skip zero term */ + while((nx > 0) && tx[nx-1]==zero) nx--; /* skip zero term */ n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi); if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;} return n; |