Skip to content

Commit

Permalink
Further Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
beachtom committed Jul 8, 2023
1 parent cb948c6 commit 50e23d3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/wasm/geometry/IfcGeometryLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2972,10 +2972,10 @@ std::vector<IfcSegmentIndexSelect> IfcGeometryLoader::ReadCurveIndices() const
_loader.StepBack();
t = _loader.GetTokenType();
// If you receive a real then add the real to the list
if (t == parsing::IfcTokenType::REAL)
if (t == parsing::IfcTokenType::INTEGER)
{
_loader.StepBack();
segment.indexs.push_back(static_cast<uint32_t>(_loader.GetDoubleArgument()));
segment.indexs.push_back(static_cast<uint32_t>(_loader.GetIntArgument()));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/wasm/geometry/IfcGeometryProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1584,9 +1584,9 @@ namespace webifc::geometry
// while we have point set begin
while (_loader.GetTokenType() == parsing::IfcTokenType::SET_BEGIN)
{
result.push_back(_loader.GetIntArgument());
result.push_back(_loader.GetIntArgument());
result.push_back(_loader.GetIntArgument());
result.push_back((uint32_t)_loader.GetIntArgument());
result.push_back((uint32_t)_loader.GetIntArgument());
result.push_back((uint32_t)_loader.GetIntArgument());

// read point set end
_loader.GetTokenType();
Expand Down
2 changes: 1 addition & 1 deletion src/wasm/parsing/IfcTokenChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ namespace webifc::parsing
double value = number_value.first;

if (negative) value *= -1;
if (number_value.second) {
if (!number_value.second) {
Push<uint8_t>(IfcTokenType::INTEGER);
Push<int>((int)value);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/wasm/parsing/number_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace webifc::parsing {
++num;
break;
} else {
return {sign * int_part,false};
return {sign * int_part,has_frac};
}
++num;
}
Expand All @@ -71,7 +71,7 @@ namespace webifc::parsing {
++num;
break;
} else {
return {sign * (int_part + frac_part),false};
return {sign * (int_part + frac_part),has_frac};
}
++num;
}
Expand Down

0 comments on commit 50e23d3

Please sign in to comment.