Bugfix : If bool property is written and conatins 0x20 in file, reader will fail (Thanks to Simon Flöry for the patch)
Unittest: Added test case for this bug git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@957 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -93,6 +93,13 @@ bool _OMReader_::read(const std::string& _filename, BaseImporter& _bi, Options&
|
||||
|
||||
// Open file
|
||||
std::ifstream ifs(_filename.c_str(), std::ios::binary);
|
||||
|
||||
/* Clear formatting flag skipws (Skip whitespaces). If set, operator>> will
|
||||
* skip bytes set to whitespace chars (e.g. 0x20 bytes) in
|
||||
* Property<bool>::restore.
|
||||
*/
|
||||
ifs.unsetf(std::ios::skipws);
|
||||
|
||||
if (!ifs.is_open() || !ifs.good()) {
|
||||
omerr() << "[OMReader] : cannot not open file " << _filename << std::endl;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user