mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
matrix-stack: Fix the _cogl_matrix_entry_equal function
The _cogl_matrix_entry_equal function has a large switch statement to do the right kind of comparison for the entry. However most of the entries have a return statement that is only conditionally reached. There were no corresponding break statements to the case labels so presumably if the comparison succeeded for the correct entry type it would also flow through and try the comparison for the next type which would be extremely unlikely to pass. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 339db0f9cc3ee2bee4c56f9cb05dcb4ddd6815ed)
This commit is contained in:
parent
6eb8864866
commit
aa749bb177
@ -863,6 +863,7 @@ _cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||
translate0->z != translate1->z)
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case COGL_MATRIX_OP_ROTATE:
|
||||
{
|
||||
CoglMatrixEntryRotate *rotate0 =
|
||||
@ -875,6 +876,7 @@ _cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||
rotate0->z != rotate1->z)
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case COGL_MATRIX_OP_SCALE:
|
||||
{
|
||||
CoglMatrixEntryScale *scale0 = (CoglMatrixEntryScale *)entry0;
|
||||
@ -884,6 +886,7 @@ _cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||
scale0->z != scale1->z)
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case COGL_MATRIX_OP_MULTIPLY:
|
||||
{
|
||||
CoglMatrixEntryMultiply *mult0 = (CoglMatrixEntryMultiply *)entry0;
|
||||
@ -891,6 +894,7 @@ _cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||
if (!cogl_matrix_equal (mult0->matrix, mult1->matrix))
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case COGL_MATRIX_OP_LOAD:
|
||||
{
|
||||
CoglMatrixEntryLoad *load0 = (CoglMatrixEntryLoad *)entry0;
|
||||
|
Loading…
Reference in New Issue
Block a user