fixed crash in test_core

This commit is contained in:
Vadim Pisarevsky 2011-04-18 15:34:35 +00:00
parent 9a991a2e10
commit 94e09f24c7

View File

@ -363,9 +363,10 @@ string tempfile( const char* suffix )
#endif
if (*name == '\\')
++name;
string n(name);
if (suffix != 0)
return string(buf) + suffix;
return buf;
n += (n[n.size()-1] == '.' && suffix[0] == '.' ? suffix + 1 : suffix);
return n;
}
static CvErrorCallback customErrorCallback = 0;