1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Fixes (void *) to (attr_t) casting on certain target configurations
where sizeof(attr_t) < sizeof(void *)
--- a/scintilla/scinterm/ScintillaTerm.cxx 2013-03-17 19:22:04.864167902 +0100
+++ b/scintilla/scinterm/ScintillaTerm.cxx 2013-03-17 19:44:48.832401507 +0100
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <string>
#include <vector>
@@ -274,7 +275,8 @@
void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase,
const char *s, int len, ColourDesired fore,
ColourDesired back) {
- wattr_set(win, reinterpret_cast<attr_t>(font_.GetID()),
+ intptr_t id = reinterpret_cast<intptr_t>(font_.GetID());
+ wattr_set(win, static_cast<attr_t>(id),
term_color_pair(fore, back), NULL);
if (rc.left < 0) s += static_cast<int>(-rc.left), rc.left = 0;
mvwaddnstr(win, rc.top, rc.left, s, Platform::Minimum(len, COLS - rc.left));
|