X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fflow.c;h=607994d0387b1494e8de74aee346fc5906640367;hp=b9593df470142f151b657cec07094b2e8987d495;hb=6cee540bdbb571485cd5e519f89f389faebd0495;hpb=40eacb5812ef7c0e3374fb139afbb4f5bc8bbfb5 diff --git a/hacks/flow.c b/hacks/flow.c index b9593df4..607994d0 100644 --- a/hacks/flow.c +++ b/hacks/flow.c @@ -807,7 +807,8 @@ draw_flow(ModeInfo * mi) double A=0; for(i=0; i<3; i++) A+=C[j][i]*C[j][i]; /* sum squares */ A=sqrt(A); - for(i=0; i<3; i++) C[j][i]/=A; + if (A != 0) /* #### is this right? */ + for(i=0; i<3; i++) C[j][i]/=A; } /* Interpolate between Center and Trained Bee matrices */