diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-03-18 17:33:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-18 17:33:27 +0100 |
| commit | 5c482f9d9b357e098f955351f425bc985254ff28 (patch) | |
| tree | c410588ac915886aea4bef3478a12d682bb5ad9f /src/fl_draw.cxx | |
| parent | a9fb6a979fbcf31c2405d61ea720879bd5507d02 (diff) | |
Fix and update alignment #346 (#701)
* interactive layout alignment rewritten
* interface for new alignment rules
* new alignment dialog box
* user defined layout rules added
* layout rules can be stored in projects, settings, and external files
* Valgrind verification
Diffstat (limited to 'src/fl_draw.cxx')
| -rw-r--r-- | src/fl_draw.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 04ebbc6e0..5073d4ee4 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -43,15 +43,17 @@ static char* underline_at; */ static const char* expand_text_(const char* from, char*& buf, int maxbuf, double maxw, int& n, double &width, int wrap, int draw_symbols) { - char* e = buf+(maxbuf-4); underline_at = 0; double w = 0; static int l_local_buff = 500; static char *local_buf = (char*)malloc(l_local_buff); // initial buffer allocation + char* e; if (maxbuf == 0) { buf = local_buf; e = buf + l_local_buff - 4; - } + } else { + e = buf+(maxbuf-4); + } char* o = buf; char* word_end = o; const char* word_start = from; |
