Curtis L. Olson wrote: > Bernie Bright writes: > > Compiling YASim with the new Intel C++ V6 compiler gives the following > > warning: > > > > ../../../../src/FDM/YASim/Model.cpp(260): warning #175: subscript out of > > range > > float dist = ground[4] - Math::dot3(ground, _wingCenter); > > This is definitely a typo/bug. ground[] is defined as a 4 element > array right before, so should only be refering to grount[0] - > ground[3]. Andy, did you mean to say ground[3] here?
[Sorry it took me so long to get to this. I was in Boston last week.] Uh, yeah. :) I'm shocked that this every worked. The code in question calculates ground effect, so a random value in the ground plane magnitude should make things pretty wacky. Maybe we were just lucky enough to have a zero in that place on the stack? And, by way of vain attempts to deflect blame, why aren't we doing compiles with full warnings on? A -Wall switch would (well, certainly should have) detected this much earlier. I'm a little scared to check this in blindly (in case a swapped a sign somewhere else or whatnot). If someone wants to try this and report that it works (be sure to try a landing in a few different aircraft), I'll do so this afternoon. Otherwise it'll need to wait for me to get home tonight. Andy -- Andrew J. Ross NextBus Information Systems Senior Software Engineer Emeryville, CA [EMAIL PROTECTED] http://www.nextbus.com "Men go crazy in conflagrations. They only get better one by one." - Sting (misquoted) _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
