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.
}
}
- 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);