]> git.mxchange.org Git - flightgear.git/commitdiff
Melchior FRANZ:
authorehofman <ehofman>
Sat, 26 Mar 2005 10:45:00 +0000 (10:45 +0000)
committerehofman <ehofman>
Sat, 26 Mar 2005 10:45:00 +0000 (10:45 +0000)
The previous message wasn't totally correct. Strings are now allowed, too. And
the pattern is now '[ -+#]?\d*(\.\d*)?l?[fs]' and *may* be embedded in a string.
There may only be one %s or %f, though. %% is allowed in the preamble/postamble.
(Yes, %ls is allowed, too, and treated as %s.)

Also, "end" is superfluous now.

src/GUI/dialog.cxx

index 4cac703b1ba67e4087e03256f555d610ca3262f8..bcafd67ae83a57a4c248936788d6d81cae4768fc 100644 (file)
@@ -141,13 +141,11 @@ format_callback(puObject *obj, int dx, int dy, void *n)
         }
     }
 
-    char buf[256], *end;
+    char buf[256];
     const char *src = obj->getLabel();
 
     if (number) {
         float value = atof(src);
-        if (end == src)
-            return;    // not a number
         snprintf(buf, 256, format, value);
     } else {
         snprintf(buf, 256, format, src);