summaryrefslogtreecommitdiff
path: root/common/project.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/project.cpp')
-rw-r--r--common/project.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/project.cpp b/common/project.cpp
index 3b535e3..2f177a3 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -510,9 +510,13 @@ bool Project::LoadPieceLibrary (char *libpath)
// Load piece indexes
delete [] m_pPieceIdx;
- m_pPieceIdx = new PieceInfo[count] (idx);
+ m_pPieceIdx = new PieceInfo[count];
m_nPieceCount = count;
+ // workaround for VC++ error C2538: new : cannot specify initializer for arrays
+ for (PieceInfo *pElements = m_pPieceIdx; count--; pElements++)
+ pElements->LoadIndex (idx);
+
// Load moved files reference.
if (m_pMovedReference != NULL)
free(m_pMovedReference);