[cairo-commit] 3 commits - src/cairo-misc.c test/pdf-tagged-text.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 20 23:03:38 UTC 2021


 src/cairo-misc.c       |    2 ++
 test/pdf-tagged-text.c |    4 ++++
 2 files changed, 6 insertions(+)

New commits:
commit ab82549f0344760988844a670133f1ad789b8a89
Merge: 82f5570ad a8238adc5
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Jul 20 23:03:37 2021 +0000

    Merge branch 'strtod-fix' into 'master'
    
    Ensure _cairo_strtod accepts a leading sign character
    
    Closes #499
    
    See merge request cairo/cairo!203

commit a8238adc5a1b9a38ce93d37df1a9f488a8303893
Author: Jonathan Kew <jfkthame at gmail.com>
Date:   Tue Jul 20 17:45:21 2021 +0100

    Add link with a negative coordinate to testcase.

diff --git a/test/pdf-tagged-text.c b/test/pdf-tagged-text.c
index c64a6a461..69dc6b928 100644
--- a/test/pdf-tagged-text.c
+++ b/test/pdf-tagged-text.c
@@ -385,6 +385,10 @@ create_document (cairo_surface_t *surface, cairo_t *cr)
     cairo_tag_end (cr, CAIRO_TAG_LINK);
     cairo_restore (cr);
 
+    /* An annotation whose rect has a negative coordinate. */
+    cairo_tag_begin (cr, CAIRO_TAG_LINK, "uri='http://127.0.0.1/' rect=[10.0 -10.0 100.0 100.0]");
+    cairo_tag_end (cr, CAIRO_TAG_LINK);
+
     cairo_show_page (cr);
 
     page_num = 0;
commit b7d67433b7c03e8953c792e1f82e5b74ffe935af
Author: Jonathan Kew <jfkthame at gmail.com>
Date:   Tue Jul 20 17:46:01 2021 +0100

    Accept a leading sign character in _cairo_strtod.

diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index e683198e7..bd1f30627 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -862,6 +862,8 @@ _cairo_strtod (const char *nptr, char **endptr)
 	    bufptr += decimal_point_len;
 	    delta -= decimal_point_len - 1;
 	    have_dp = TRUE;
+	} else if (bufptr == buf && (*p == '-' || *p == '+')) {
+	    *bufptr++ = *p;
 	} else {
 	    break;
 	}


More information about the cairo-commit mailing list