Skip to content

Commit 1590575

Browse files
committed
update ReaderUtil.cpp
1 parent 6a3433e commit 1590575

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*.tlog
2222
*.log
2323
*.bin
24+
*.vsidx
25+
*.lock
2426
bin
2527
bin32
2628
/build/
@@ -41,3 +43,4 @@ examples/LoadFileExampleNoGUI/LoadFileExampleNoGUI/x64/
4143
external/Carve/build/
4244
examples/CreateWallAndWriteFile/x64/
4345
examples/LoadFileWithGeometryExampleConsole/dump_mesh_debug.txt
46+

IfcPlusPlus/src/ifcpp/reader/ReaderUtil.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ void decodeArgumentStrings( std::vector<std::string>& entity_arguments, std::vec
675675
{
676676
for(auto & argument_str : entity_arguments)
677677
{
678-
const size_t arg_length = argument_str.length();
678+
const size_t arg_length = argument_str.length();
679679
if( arg_length == 0 )
680680
{
681681
continue;
@@ -685,6 +685,15 @@ void decodeArgumentStrings( std::vector<std::string>& entity_arguments, std::vec
685685
arg_str_new.reserve(arg_length);
686686

687687
char* stream_pos = const_cast<char*>(argument_str.c_str()); // ascii characters from STEP file
688+
if( ((*stream_pos) < 32 || (*stream_pos) > 126) )
689+
{
690+
if( !std::isspace(static_cast<unsigned char>(*stream_pos)) )
691+
{
692+
std::cout << "unsupported character encountered\n";
693+
return;
694+
}
695+
}
696+
688697
while( *stream_pos != '\0' )
689698
{
690699
if( *stream_pos == '\\' )

examples/LoadFileWithGeometryExampleConsole/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ int main()
170170

171171
// 2: load the model:
172172
std::cout << "Loading IFC model: ";
173-
step_reader->loadModelFromFile( L"exampleäöüßÄÖÜ.ifc", ifc_model);
173+
step_reader->loadModelFromFile( L"example.ifc", ifc_model);
174174

175175
shared_ptr<GeometryConverter> geometry_converter(new GeometryConverter(ifc_model));
176176
geometry_converter->setMessageCallBack(&mh, &MessageHandler::slotMessageWrapper);

0 commit comments

Comments
 (0)