Bug 807

Summary: ns2-mobility-helper.cc: node id parsed wrong
Product: ns-3 Reporter: twaldecker
Component: helpersAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: jpelkey
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: ns2-mobility-helper

Description twaldecker 2010-02-05 04:47:36 EST
Created attachment 755 [details]
ns2-mobility-helper

Hi,

The Node Id is parsed wrong in ns2-mobility-helper.cc
It is just a small error i think it doesnt affect the parsing, but if you output the node id it is e.g. "5)" the number with the closing bracket.

it has to be:
line.substr (startNodeId + 1, endNodeId - (startNodeId + 1))

instead of
line.substr (startNodeId + 1, endNodeId - startNodeId)

I also added a debug output to echo the nodeid.

I attach my changed sourcecode where i correct this bug and added a few comments.

Thomas
Comment 1 Josh Pelkey 2010-04-16 13:26:31 EDT
changeset 617ac18757e6