From: Marcus M. <mar...@us...> - 2008-01-09 13:19:47
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21955 Modified Files: exif-entry.c Log Message: Fixed rounding of exposure time to match better. (Patch from Thorsten Kukuk, https://bugzilla.novell.com/show_bug.cgi?id=223752) Index: exif-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -p -d -r1.112 -r1.113 --- exif-entry.c 27 Dec 2007 16:22:57 -0000 1.112 +++ exif-entry.c 9 Jan 2008 13:19:41 -0000 1.113 @@ -788,7 +788,7 @@ exif_entry_get_value (ExifEntry *e, char if (!v_rat.denominator) return val; d = (double) v_rat.numerator / (double) v_rat.denominator; if (d < 1) - snprintf (val, maxlen, _("1/%d"), (int) (1. / d)); + snprintf (val, maxlen, _("1/%d"), (int) (0.5 + 1. / d)); else snprintf (val, maxlen, _("%d"), (int) d); if (maxlen > strlen (val) + strlen (_(" sec."))) |