diff options
Diffstat (limited to 'ldmicro/lib/linuxUI/linuxUI.cpp')
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ldmicro/lib/linuxUI/linuxUI.cpp b/ldmicro/lib/linuxUI/linuxUI.cpp index d8bb06c..5125ed9 100644 --- a/ldmicro/lib/linuxUI/linuxUI.cpp +++ b/ldmicro/lib/linuxUI/linuxUI.cpp @@ -309,9 +309,12 @@ void TextOut(HWID hWid, HCRDC hcr, int nXStart, int nYStart, LPCTSTR lpString, i if (resize_flag) gtk_widget_set_size_request(hWid, width, height); + char* text = (char*)malloc(cchString); + strncpy(text, lpString, cchString); + text[cchString] = '\0'; cairo_move_to(hcr, nXStart, nYStart); - cairo_show_text(hcr, lpString); + cairo_show_text(hcr, text); cairo_fill (hcr); } |