mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[hvgl] Bail on error
Easier than handling a vector too short.
This commit is contained in:
1 parent
2a3477c87f
commit
fc62af31c3
1 file changed
+5
-2
@@ -107,6 +107,9 @@ PartShape::get_path_at (const struct hvgl &hvgl,
|
||||
else
|
||||
v = a;
|
||||
|
||||
if (unlikely (v.in_error ()))
|
||||
return;
|
||||
|
||||
coords = coords.sub_array (0, axisCount);
|
||||
// Apply deltas
|
||||
if (coords)
|
||||
@@ -159,7 +162,7 @@ PartShape::get_path_at (const struct hvgl &hvgl,
|
||||
const auto delta2 = matrix + column_idx[2] * rows_count;
|
||||
const auto delta3 = matrix + column_idx[3] * rows_count;
|
||||
|
||||
// Note: Count is always a multiple of 4, unless allocation failure
|
||||
// Note: Count is always a multiple of 4
|
||||
for (unsigned i = 0; i + 4 <= rows_count; i += 4)
|
||||
{
|
||||
const auto &src0 = * (const simd_packed_double4 *) (void *) (delta0 + i);
|
||||
@@ -193,7 +196,7 @@ PartShape::get_path_at (const struct hvgl &hvgl,
|
||||
dest[i + 2] += src[i + 2] * scalar;
|
||||
dest[i + 3] += src[i + 3] * scalar;
|
||||
}
|
||||
// Note: Count is always a multiple of 4, unless allocation failure.
|
||||
// Note: Count is always a multiple of 4
|
||||
// So, the following not needed.
|
||||
if (false)
|
||||
for (; i < rows_count; i++)
|
||||
|
||||
Reference in new issue
Block a user