Bug 963198 - Don't mix up byte-size and array-length. r=tn, a=abillings
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 23 Jan 2014 17:34:04 -0500
changeset 176020 9bf1936426efc9e3d4940e74a0ea710878fd3bf2
parent 176019 0d3f6deebf430ba0a3432c176dd0537713f42d5d
child 176021 4b8d14a78596e0b9a2c5eb7f28a1e756408c8536
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn, abillings
bugs963198
milestone28.0a2
Bug 963198 - Don't mix up byte-size and array-length. r=tn, a=abillings
layout/mathml/nsMathMLmencloseFrame.cpp
--- a/layout/mathml/nsMathMLmencloseFrame.cpp
+++ b/layout/mathml/nsMathMLmencloseFrame.cpp
@@ -795,17 +795,17 @@ void nsDisplayNotation::Paint(nsDisplayL
       gfxCtx->NewPath();
       gfxPoint p[] = {
         rect.TopRight(),
         rect.TopRight() + gfxPoint(-w -.4*h, std::max(-e / 2.0, h - .4*w)),
         rect.TopRight() + gfxPoint(-.7*w, .7*h),
         rect.TopRight() + gfxPoint(std::min(e / 2.0, -w + .4*h), h + .4*w),
         rect.TopRight()
       };
-      gfxCtx->Polygon(p, sizeof(p));
+      gfxCtx->Polygon(p, MOZ_ARRAY_LENGTH(p));
       gfxCtx->Fill();
     }
       break;
 
     default:
       NS_NOTREACHED("This notation can not be drawn using nsDisplayNotation");
       break;
     }