Hi,

I can keep coming with them. :) I just need to remove a hash and add it
some lines above in my start scripts (already introduced to forums).

Curt, I have also found another FPE in AIShip.cpp and I came up with
attached patch (works fine here). Or maybe it is the same? Can you check
that out, please?

The patch also contains some extra include-lines which make my compiler
(gcc (Debian 4.4.5-10) 4.4.5) a little more happier, else it would fail
to compile.

Roland
diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx
index 9b6a047..4d8279e 100644
--- a/src/AIModel/AIShip.cxx
+++ b/src/AIModel/AIShip.cxx
@@ -624,6 +624,9 @@ void FGAIShip::ProcessFlightPlan(double dt) {
 	return;
     }
 
+    // Avoids a FPE
+    if (dt <= 0.0) return;
+
     double time_sec = getDaySeconds();
 
     _dt_count += dt;
diff --git a/src/Input/FGEventInput.cxx b/src/Input/FGEventInput.cxx
index 29ee097..8bf9f30 100644
--- a/src/Input/FGEventInput.cxx
+++ b/src/Input/FGEventInput.cxx
@@ -24,6 +24,7 @@
 #  include <config.h>
 #endif
 
+#include <cstring>
 #include "FGEventInput.hxx"
 #include <Main/fg_props.hxx>
 #include <simgear/io/sg_file.hxx>
diff --git a/src/Input/FGLinuxEventInput.cxx b/src/Input/FGLinuxEventInput.cxx
index 621e15f..c79a642 100644
--- a/src/Input/FGLinuxEventInput.cxx
+++ b/src/Input/FGLinuxEventInput.cxx
@@ -24,6 +24,10 @@
 #  include <config.h>
 #endif
 
+#include <cstring>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 #include "FGLinuxEventInput.hxx"
 
 #include <poll.h>
diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index 5fec795..c56687e 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -141,12 +141,12 @@ static void fgMainLoop( void ) {
                                 altitude->getDoubleValue() * SG_FEET_TO_METER,
                                 globals->get_time_params()->getJD() );
 
-#if ENABLE_ATCDCL  
+#if ENABLE_ATCDCL
     // Run ATC subsystem
     if (fgGetBool("/sim/atc/enabled"))
         globals->get_ATC_mgr()->update(sim_dt);
-#endif  
-    
+#endif
+
     globals->get_subsystem_mgr()->update(sim_dt);
 
     // Update the sound manager last so it can use the CPU while the GPU

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to