]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD_label.cxx
better use unset() for unsetting ...
[flightgear.git] / src / Instrumentation / HUD / HUD_label.cxx
index eb7d979f20402aa2f721aad8fb3399e879f076b7..3b83c9f58bbb9bf9882abd510c2563ef3d8e0d8d 100644 (file)
@@ -23,7 +23,6 @@
 #  include <config.h>
 #endif
 
-#include <simgear/props/condition.hxx>
 #include "HUD.hxx"
 
 
@@ -142,7 +141,8 @@ void HUD::Label::draw(void)
     }
 
     const int BUFSIZE = 256;
-    char buf[BUFSIZE];
+    char buf[BUFSIZE+1];
+       buf[ BUFSIZE] = '\0';  // Be sure to terminate properly
     if (_mode == NONE)
         snprintf(buf, BUFSIZE, _format.c_str());
     else if (_mode == STRING)