summaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/OpenGLDrawMethods.inl6
-rw-r--r--src/graphics/RasterDrawMethods.inl6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/graphics/OpenGLDrawMethods.inl b/src/graphics/OpenGLDrawMethods.inl
index 55b4f21..8392e28 100644
--- a/src/graphics/OpenGLDrawMethods.inl
+++ b/src/graphics/OpenGLDrawMethods.inl
@@ -22,9 +22,9 @@ int PIXELMETHODS_CLASS::drawtext(int x, int y, const char *s, int r, int g, int
oR = r;
oG = g;
oB = b;
- r = s[1];
- g = s[2];
- b = s[3];
+ r = (unsigned char)s[1];
+ g = (unsigned char)s[2];
+ b = (unsigned char)s[3];
s += 3;
}
else if (*s == '\x0E')
diff --git a/src/graphics/RasterDrawMethods.inl b/src/graphics/RasterDrawMethods.inl
index b5d52a9..d1236a5 100644
--- a/src/graphics/RasterDrawMethods.inl
+++ b/src/graphics/RasterDrawMethods.inl
@@ -22,9 +22,9 @@ int PIXELMETHODS_CLASS::drawtext(int x, int y, const char *s, int r, int g, int
oR = r;
oG = g;
oB = b;
- r = s[1];
- g = s[2];
- b = s[3];
+ r = (unsigned char)s[1];
+ g = (unsigned char)s[2];
+ b = (unsigned char)s[3];
s += 3;
}
else if (*s == '\x0E')