float point exception (division by zero)
Hello guys,
I found bug in vorbis lib, float point division by zero exception under C++ Builder 6. In C++ Builder by default turn on exceptions with invalid float point operations.
Bug Vorbis version 1.2.0 file: floor1.c line: 510
static void fit_line(lsfit_acc a,int fits,int y0,int y1) { ... double denom = 1./(anfx2-fxfx); //in some situation anfx2-fxfx can be 0. // I change this line like //double denom = (0. == (anfx2-fxfx)) ? 0:1./(anfx2-fx*fx); ... }