Merge "Fix a nullness warning."
This commit is contained in:
commit
b37e81d3cd
|
@ -130,6 +130,7 @@ void ZipEntry::initNew(const char* fileName, const char* comment)
|
||||||
if (mCDE.mFileCommentLength > 0) {
|
if (mCDE.mFileCommentLength > 0) {
|
||||||
/* TODO: stop assuming null-terminated ASCII here? */
|
/* TODO: stop assuming null-terminated ASCII here? */
|
||||||
mCDE.mFileComment = new uint8_t[mCDE.mFileCommentLength+1];
|
mCDE.mFileComment = new uint8_t[mCDE.mFileCommentLength+1];
|
||||||
|
assert(comment != NULL);
|
||||||
strcpy((char*) mCDE.mFileComment, comment);
|
strcpy((char*) mCDE.mFileComment, comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue