summaryrefslogtreecommitdiff
path: root/lib/glfont.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glfont.cc')
-rw-r--r--lib/glfont.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/glfont.cc b/lib/glfont.cc
index 9b77c8c..80a8b1d 100644
--- a/lib/glfont.cc
+++ b/lib/glfont.cc
@@ -111,7 +111,7 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), w
Uint8 * curtex = (Uint8 *) fonttex[0]->GetSurface()->pixels;
Uint32 curU = 0, curV = 0, curT = 0;
- for (int i = 0; i < nbentries; i++) {
+ for (i = 0; i < nbentries; i++) {
sizes[i] = ffont->readU8();
for (int v = 0; v < maxY; v++) {
for (int u = 0; u < maxX; u++) {
@@ -147,7 +147,9 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), w
corresp = (Uint16 *) malloc(nbentries * 2 * sizeof(Uint16));
- ffont->read(corresp, 2 * sizeof(Uint16) * nbentries);
+ for (i = 0; i < 2 * nbentries; i++) {
+ corresp[i] = ffont->readU16();
+ }
}
mogltk::font::~font() {