]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed a bug report from Frederic Bouvier:
authordavid <david>
Wed, 27 Mar 2002 12:59:53 +0000 (12:59 +0000)
committerdavid <david>
Wed, 27 Mar 2002 12:59:53 +0000 (12:59 +0000)
as a follow-up of my previous message, I found that in panel.cxx, function
const char *FGTextLayer::Chunk::getValue () const, there is the use of a
member variable _buf that seems to be uninitialized.

src/Cockpit/panel.cxx

index 25c2c44e4532a1dbf742749e65015b4a2071e93f..18887b83bff04c54d802bbe3f03f61790bf59061 100644 (file)
@@ -1096,6 +1096,7 @@ const char *
 FGTextLayer::Chunk::getValue () const
 {
   if (test()) {
+    _buf[0] = '\0';
     switch (_type) {
     case TEXT:
       sprintf(_buf, _fmt.c_str(), _text.c_str());