summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/project.cpp8
-rw-r--r--win/Piecebar.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/common/project.cpp b/common/project.cpp
index 4a1420e..bc0b09a 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -522,7 +522,7 @@ bool Project::FileLoad(File* file, bool bUndo, bool bMerge)
}
else
{
- char name[9];
+ char name[LC_PIECE_NAME_LEN];
float pos[3], rot[3], param[4];
unsigned char color, step, group;
@@ -1079,9 +1079,9 @@ void Project::FileReadLDraw(File* file, Matrix* prevmat, int* nOk, int DefColor,
*ptr = 0;
// See if it's a piece in the library
- if (strlen(tmp) < 9)
+ if (strlen(tmp) < LC_PIECE_NAME_LEN)
{
- char name[9];
+ char name[LC_PIECE_NAME_LEN];
strcpy(name, tmp);
PieceInfo* pInfo = lcGetPiecesLibrary()->FindPieceInfo(name);
@@ -4735,7 +4735,7 @@ void Project::HandleCommand(LC_COMMANDS id, unsigned long nParam)
file->Read(&i, sizeof(i));
while (i--)
{
- char name[9];
+ char name[LC_PIECE_NAME_LEN];
Piece* pPiece = new Piece(NULL);
pPiece->FileLoad(*file, name);
PieceInfo* pInfo = lcGetPiecesLibrary()->FindPieceInfo(name);
diff --git a/win/Piecebar.cpp b/win/Piecebar.cpp
index 6c949cd..87e76ae 100644
--- a/win/Piecebar.cpp
+++ b/win/Piecebar.cpp
@@ -830,7 +830,7 @@ void CPiecesBar::SelectPiece(const char* Category, PieceInfo* Info)
PieceInfo* Parent;
// Find the parent of this patterned piece and expand it.
- char ParentName[9];
+ char ParentName[LC_PIECE_NAME_LEN];
strcpy(ParentName, Info->m_strName);
*strchr(ParentName, 'P') = '\0';