# include <config.h>
#endif
-#include <simgear/props/condition.hxx>
#include "HUD.hxx"
void HUD::Label::draw(void)
{
- if (!(_mode == NONE || _input.isValid() && blink()))
+ if (!(_mode == NONE || (_input.isValid() && blink())))
return;
if (_box) {
}
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());
+ snprintf(buf, BUFSIZE, _format.c_str(), 0);
else if (_mode == STRING)
snprintf(buf, BUFSIZE, _format.c_str(), _input.getStringValue());
else if (_mode == INT)