From 7cef36258148e2c202535b5761df8545718a27bf Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 25 May 2026 11:23:10 +0800 Subject: [PATCH] Fix the Android build * src/sfnt.c (sfnt_fill_span) [NDEBUG]: Don't access `row_end' when not defined. --- src/sfnt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sfnt.c b/src/sfnt.c index 4900daee6f6..4e4e2e121e6 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -4363,8 +4363,10 @@ sfnt_fill_span (struct sfnt_raster *raster, sfnt_fixed y, if ((left & ~SFNT_POLY_MASK) == (right & ~SFNT_POLY_MASK)) { +#ifndef NDEBUG /* Assert that start does not exceed the end of the row. */ eassert (start <= row_end); +#endif /* !NDEBUG */ w = coverage[right - left]; a = *start + w; @@ -4379,8 +4381,10 @@ sfnt_fill_span (struct sfnt_raster *raster, sfnt_fixed y, if (left & SFNT_POLY_MASK) { +#ifndef NDEBUG /* Assert that start does not exceed the end of the row. */ eassert (start <= row_end); +#endif /* !NDEBUG */ /* Compute the coverage for the first pixel, and move left past it. The coverage is a number from 1 to 7 describing how @@ -4406,8 +4410,10 @@ sfnt_fill_span (struct sfnt_raster *raster, sfnt_fixed y, /* Fill pixels between left and right. */ while (left + SFNT_POLY_MASK < right) { +#ifndef NDEBUG /* Assert that start does not exceed the end of the row. */ eassert (start <= row_end); +#endif /* !NDEBUG */ a = *start + w; *start++ = sfnt_saturate_short (a); @@ -4418,8 +4424,10 @@ sfnt_fill_span (struct sfnt_raster *raster, sfnt_fixed y, if (right & SFNT_POLY_MASK) { +#ifndef NDEBUG /* Assert that start does not exceed the end of the row. */ eassert (start <= row_end); +#endif /* !NDEBUG */ w = coverage[right - left]; a = *start + w;