git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Invalid array indices are not cool
[ipdf/code.git]
/
src
/
document.cpp
diff --git
a/src/document.cpp
b/src/document.cpp
index
ffe3b8a
..
d8466dd
100644
(file)
--- a/
src/document.cpp
+++ b/
src/document.cpp
@@
-439,12
+439,15
@@
unsigned Document::Add(ObjectType type, const Rect & bounds, unsigned data_index
m_quadtree.nodes[new_qti].next_overlay = overlay;
new_qti = overlay;
}
m_quadtree.nodes[new_qti].next_overlay = overlay;
new_qti = overlay;
}
-done:
+done:
// matches is not amused, but sulix is nice and moved it inside the #ifdef for him.
m_count++;
PropagateQuadChanges(qti);
}
m_count++;
PropagateQuadChanges(qti);
}
+ return m_count;
+#else // words fail me (still not amused)
+ return (m_count++);
#endif
#endif
- return m_count; // Why can't we just use the size of types or something?
+
}
unsigned Document::AddBezierData(const Bezier & bezier)
}
unsigned Document::AddBezierData(const Bezier & bezier)
UCC
git Repository :: git.ucc.asn.au