summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldmicro/draw_outputdev.cpp2
-rw-r--r--ldmicro/lib/linuxUI/linuxUI.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/ldmicro/draw_outputdev.cpp b/ldmicro/draw_outputdev.cpp
index 9ac55ab..9965483 100644
--- a/ldmicro/draw_outputdev.cpp
+++ b/ldmicro/draw_outputdev.cpp
@@ -278,7 +278,7 @@ void PaintWindow()
}
cy -= 2;
DrawEndRung(0, cy);
- g_print("cy = %i\n", cy);
+
if(SelectedGxAfterNextPaint >= 0) {
MoveCursorNear(SelectedGxAfterNextPaint, SelectedGyAfterNextPaint);
InvalidateRect(DrawWindow, NULL, FALSE);
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);
}