diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-08-29 07:49:22 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-08-29 07:49:22 +0000 |
| commit | ba8bb3d8c278a70895e3b138fcfe9cbd91d5cbd0 (patch) | |
| tree | a15739bedb92bf9ac25c71089f70c36b09c69059 | |
| parent | 3ae2d9cc7b95bcb7a885719a20a588e93cf6001f (diff) | |
Fixed fl_measure which mistook a trailing '@@' for a symbol (STR #1406)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/fl_draw.cxx | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,7 @@ CHANGES IN FLTK 1.1.8 + - Fixed fl_measure which mistook a trailing '@@' + for a symbol (STR #1406) - Fixed GLUT behavior on window creation (STR #1403) - Fixed OS X bug that would hide tooltips before they were shown (STR #1392) diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 762a33b47..d1fe15839 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -305,7 +305,7 @@ void fl_measure(const char* str, int& w, int& h, int draw_symbols) { symwidth[0] = h; } - if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1)) { + if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1) && p[-1]!='@') { strlcpy(symbol[1], p, sizeof(symbol[1])); symwidth[1] = h; } |
