From 63e9d774c858dfe79264a24ae8daa3dde3c7bb6e Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Sun, 5 Oct 2014 16:21:06 +0800 Subject: [PATCH] Invalid array indices are not cool --- src/document.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/document.cpp b/src/document.cpp index f4f306e..d8466dd 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -443,11 +443,11 @@ done: // matches is not amused, but sulix is nice and moved it inside the #ifdef m_count++; PropagateQuadChanges(qti); } -#else // Although empty documents do always render correctly at any zoom, - // I suspect the markers will not be amused - m_count++; + return m_count; +#else // words fail me (still not amused) + return (m_count++); #endif - return m_count; // Why can't we just use the size of types or something? + } unsigned Document::AddBezierData(const Bezier & bezier) -- 2.20.1