- bugfixes for coverity reported issues

- new bash parameters for build-mg.sh (in prep for coverity automation)
- updated travis build to use new bash param
This commit is contained in:
SoftCoder
2013-12-17 17:35:51 -08:00
parent d8160c1065
commit e3996ceb92
15 changed files with 147 additions and 59 deletions

View File

@@ -920,7 +920,9 @@ void MapPreview::saveToFile(const string &path) {
header.heightFactor = heightFactor;
header.waterLevel = waterLevel;
strncpy(header.title, title.c_str(), MAX_TITLE_LENGTH);
header.title[MAX_TITLE_LENGTH-1] = 0;
strncpy(header.author, author.c_str(), MAX_AUTHOR_LENGTH);
header.author[MAX_AUTHOR_LENGTH-1] = 0;
strncpy(header.version2.short_desc, desc.c_str(), MAX_DESCRIPTION_LENGTH_VERSION2);
header.version2.short_desc[MAX_DESCRIPTION_LENGTH_VERSION2-1] = 0;
header.version2.magic= 0x01020304;