fmod() preserves sign of the first operand and floor() will return
negative values for negative operands. The patch below fixes it.
diff --git a/ufraw_ufraw.c b/ufraw_ufraw.c
index cbe592a..972c56b 100644
--- a/ufraw_ufraw.c
+++ b/ufraw_ufraw.c
@@ -455,6 +455,8 @@ int ufraw_config(ufraw_data *uf, conf_data *rc, conf_data
*conf, conf_data *cmd)
// Normalise rotations to a flip, then rotation of 0 < a < 90 degrees.
uf->conf->rotationAngle = fmod(uf->conf->rotationAngle, 360.0);
+ if (uf->conf->rotationAngle < 0.0)
+ uf->conf->rotationAngle += 360.0;
int angle, flip = 0;
angle = floor(uf->conf->rotationAngle/90)*90;
switch (angle) {
--
Frank
------------------------------------------------------------------------------
_______________________________________________
ufraw-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-devel