]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
<rdar://problem/ 13493241> APVT3.0 checks a custom size using a 1/100mm smaller size
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 13 May 2013 16:36:57 +0000 (16:36 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 13 May 2013 16:36:57 +0000 (16:36 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10976 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-1.6.txt
cups/pwg-media.c

index b1d718471fed3644a036af4ed5eb1f8788249d02..26151353d4710084545f593d4dfa1a2e185127f1 100644 (file)
@@ -5,6 +5,8 @@ CHANGES IN CUPS V1.6.3
 
        - The configure script now prefers Clang over GCC.
        - Fixed a compile problem on AIX (STR #4307)
+       - Fixed a rounding error in the PWG media size mapping code
+         (<rdar://problem/13493241>)
        - Fixed several ipptool test files that used old STATUS names.
        - Kerberos credentials could get truncated when printing to a shared
          printer.
index cd392ef980220d8ad0d7e94c900fc3076607bbaf..1272e761786ccb47227ca7bfe12125392700697a 100644 (file)
@@ -868,13 +868,13 @@ pwgMediaForPWG(const char *pwg)           /* I - PWG size name */
 
        if (!strcmp(ptr, "mm"))
        {
-         size->width  = (int)(w * 100);
-         size->length = (int)(l * 100);
+         size->width  = (int)(w * 100 + 0.5);
+         size->length = (int)(l * 100 + 0.5);
        }
        else
        {
-         size->width  = (int)(w * 2540);
-         size->length = (int)(l * 2540);
+         size->width  = (int)(w * 2540 + 0.5);
+         size->length = (int)(l * 2540 + 0.5);
        }
 
         strlcpy(cg->pwg_name, pwg, sizeof(cg->pwg_name));