cogl-path: Fix the truncation when adding to a copied path
If a path is copied and then appended to, the copy needs to have the last sub path truncated so that it fits in the total path size in case the original path was modified. However the path size check was broken so if the copied path had more than one sub path it would fail.
This commit is contained in:
parent
fddd316986
commit
3196658b8c
@ -77,7 +77,7 @@ _cogl_path_modify (CoglPath *path)
|
|||||||
the total path size */
|
the total path size */
|
||||||
new_nodes = &g_array_index (path->path_nodes, CoglPathNode, 0);
|
new_nodes = &g_array_index (path->path_nodes, CoglPathNode, 0);
|
||||||
for (i = 0; i < path->path_size; i += new_nodes[i].path_size)
|
for (i = 0; i < path->path_size; i += new_nodes[i].path_size)
|
||||||
if (new_nodes[i].path_size >= path->path_size)
|
if (i + new_nodes[i].path_size >= path->path_size)
|
||||||
new_nodes[i].path_size = path->path_size - i;
|
new_nodes[i].path_size = path->path_size - i;
|
||||||
|
|
||||||
cogl_handle_unref (path->parent_path);
|
cogl_handle_unref (path->parent_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user