Bug 807 - ns2-mobility-helper.cc: node id parsed wrong
ns2-mobility-helper.cc: node id parsed wrong
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: helpers
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-05 04:47 EST by twaldecker
Modified: 2010-04-16 13:26 EDT (History)
1 user (show)

See Also:


Attachments
ns2-mobility-helper (5.36 KB, text/x-c++src)
2010-02-05 04:47 EST, twaldecker
Details

Note You need to log in before you can comment on or make changes to this bug.
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