|
|
Is your feature request related to a problem? Please describe.
Given the following program:
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Simple_Terminal.H>
const char *MSG = "Hello World";
int main() {
auto w = new Fl_Window(400, 300);
auto t = new Fl_Simple_Terminal(0, 0, 400, 300);
t->append(MSG, 5);
w->end();
w->show();
return Fl::run();
}
in FLTK 1.4, the signature of append implies that when passed a length, the length will be adhered to.
However this will print the whole message (until null termination). Which I would say is unintuitive and might be a source of issues.
I am using FLTK
Describe the solution you'd like
I would suggest that the append method adhere to the passed length in non-ansi mode.
Describe alternatives you've considered
The alternative would be to allocate new strings just to add null termination, which might be undesirable.
Additional context
N/A
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/728@github.com>
[ Direct Link to Message ] | |
|
| |