summaryrefslogtreecommitdiff
path: root/common/pieceinf.cpp
diff options
context:
space:
mode:
authorleo2009-01-20 02:07:33 +0000
committerleo2009-01-20 02:07:33 +0000
commit39f41aa607a84a42c483a6356f06ff9d54c1450c (patch)
treea70bdcabc4f41023c4c0bb7da0589384b874b8aa /common/pieceinf.cpp
parent68581f47c7056ce27c20da2f5800f6b3ee77ac24 (diff)
Fixed HTML export crash, avoid more 0-size allocations.
git-svn-id: http://svn.leocad.org/tags/leocad-0.75@732 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/pieceinf.cpp')
-rw-r--r--common/pieceinf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/pieceinf.cpp b/common/pieceinf.cpp
index eee37e4..45ea2ce 100644
--- a/common/pieceinf.cpp
+++ b/common/pieceinf.cpp
@@ -350,7 +350,7 @@ void PieceInfo::LoadInformation()
// Read connections
m_nConnectionCount = LCUINT16(*((lcuint16*)bytes));
bytes += sizeof (lcuint16);
- m_pConnections = (CONNECTIONINFO*)malloc (m_nConnectionCount * sizeof(CONNECTIONINFO));
+ m_pConnections = (CONNECTIONINFO*)malloc((m_nConnectionCount+1) * sizeof(CONNECTIONINFO));
sh = m_nConnectionCount;
for (pConnection = m_pConnections; sh--; pConnection++)