Closed deech closed 5 years ago
Ah, that's a good point. As a simple stopgap, we could just escape all '%' with a second '%' to prevent their being interpreted.
I'm less of a C expert, are there any edge cases there? Stop gaps like that tend to become permanent. :)
It seems safe to me; it's how I'd print a literal format string if I didn't want it interpreted. It's also harmless if nobody sends us a format string.
It also applies to flPassword and flMessage.
Thanks!
Currently if the first argument to
flChoice
andflInput
a format string it might lead to a segfault because no format arguments are allowed. Not sure of the easiest way around that, is there a reliable format string parser that can test it and reject the call with a suitable error message? @ericu, any thoughts?