Merge pull request #5299 from ilya-lavrenov:core_hog

This commit is contained in:
Alexander Alekhin 2015-09-04 14:30:17 +00:00
commit 6fefc53e56

View File

@ -346,6 +346,7 @@ CV_IMPL CvString
cvMemStorageAllocString( CvMemStorage* storage, const char* ptr, int len )
{
CvString str;
memset(&str, 0, sizeof(CvString));
str.len = len >= 0 ? len : (int)strlen(ptr);
str.ptr = (char*)cvMemStorageAlloc( storage, str.len + 1 );