From: Anders G. <and...@gi...> - 2010-04-22 15:25:35
|
On Thu, 22 Apr 2010, Sean McLeod wrote: > Hi > > Jon mentioned a while ago that Visual Studio 2010 was being released soon. > > I installed the released version of VS2010 and built JSBSim and ran > into an issue with an index out of bounds assert from the std string > class from within the trim_left() function which was being passed an > empty string after trim_right() had reduced it to an empty string since > it only consisted of whitepace characters. Hi, I think you need to double check the currency of your JSBSim CVS work directory. The trim_left and trim_right functions was fixed quite some time ago (Oct 2009). They are now: string& trim_left(string& str) { while (str.size() && isspace((unsigned char)str[0])) { str = str.erase(0,1); } return str; } string& trim_right(string& str) { while (str.size() && isspace((unsigned char)str[str.size()-1])) { str = str.erase(str.size()-1,1); } return str; } Cheers, Anders -- --------------------------------------------------------------------------- Anders Gidenstam WWW: http://www.gidenstam.org/FlightGear/ |