- lgtToWrite = lgth > 50 ? 50 : lgth;
- fp->write( spaces, lgtToWrite );
- }
- else
- {
- // TODO : FIXME
- // how to white out disk space if longer than 50 ?
- (*it).Value = (*it).Value + spaces;
- lgtToWrite = lgth > (*it).Value.length() ? (*it).Value.length() : lgth;
- fp->write( (char *)(*it).Value.c_str(), lgtToWrite );
-
+ spaces = new std::string( lgth-valLgth, ' ');
+ (*it).Value = (*it).Value + *spaces;
+ delete spaces;