
23 May
2006
23 May
'06
4:42 p.m.
If the format string have an absolute tabulation (%t), the basic_format::clear() method throws an access violation because of this piece code in format_implementation.hpp(138): if( bound_.size()==0 || !bound_[ items_[i].argN_ ] ) Here items_[i].argN_ can be negative (defined in internals.hpp(70)), which is an invalid index to bound_[]. I think a simple check of greather than zero would suffice to fix it. Here is a code that catches it: using boost::format; format f("%0s%-32.32s:%|40t|%|.6|%|55t|%25s\n"); f % "test1" % 2.0 % "test3"; f % "test4" % 5.0 % "test6"; // calls clear() and breaks