OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000290OMNeT++simulation kernelpublic2011-05-03 21:222011-05-05 17:34
Reporterjesjones 
Assigned Toandras 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.1 
Target VersionFixed in Version 
Summary0000290: InifileReader::readLineInto fails for long lines
DescriptionreadLineInto can remove whitespace from the middle of lines that are longer than 512 characters because the loop assumes that it was able to read the entire line.

Additional Information--- a/src/envir/inifilereader.cc
+++ b/src/envir/inifilereader.cc
@@ -235,7 +235,10 @@ bool InifileReader::readLineInto(std::string& line, FILE *file)
         const char *endBuffer = buffer + strlen(buffer);
         if (buffer==endBuffer) break; // should not happen
         bool eolReached = *(endBuffer-1)=='\n' || *(endBuffer-1)=='\r';
- while (endBuffer>buffer && opp_isspace(*(endBuffer-1))) endBuffer--;
+ if (eolReached)
+ {
+ while (endBuffer>buffer && opp_isspace(*(endBuffer-1))) endBuffer--;
+ }
         line.append(buffer, endBuffer - buffer);
         if (eolReached)
             break;
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000432)
andras (administrator)
2011-05-05 17:34

Fixed. Thanks for reporting it!

- Issue History
Date Modified Username Field Change
2011-05-03 21:22 jesjones New Issue
2011-05-05 17:34 andras Note Added: 0000432
2011-05-05 17:34 andras Status new => resolved
2011-05-05 17:34 andras Fixed in Version => 4.2b3
2011-05-05 17:34 andras Resolution open => fixed
2011-05-05 17:34 andras Assigned To => andras


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker