Skip to content

Commit

Permalink
Only use positive ints for object id's
Browse files Browse the repository at this point in the history
Missed that in the spec.
  • Loading branch information
nallath committed Jul 27, 2017
1 parent ef0d1e1 commit c43715d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ThreeMFParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ std::string ThreeMFParser::sceneToString(Scene scene)
for(int i = 0; i < scene.getAllSceneNodes().size(); i++)
{
SceneNode* scene_node = scene.getAllSceneNodes().at(i);
scene_node->setId(std::to_string(i));
scene_node->setId(std::to_string(i + 1));
}

for(SceneNode* scene_node: scene.getAllSceneNodes())
Expand Down Expand Up @@ -111,4 +111,4 @@ std::string ThreeMFParser::sceneToString(Scene scene)
std::stringstream ss;
document.save(ss);
return ss.str();
}
}

0 comments on commit c43715d

Please sign in to comment.