projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e34c5a
)
fix a seg, fix the loop for rendering a string
author
Dana Jansens
<danakj@orodu.net>
Thu, 29 May 2003 00:12:18 +0000
(
00:12
+0000)
committer
Dana Jansens
<danakj@orodu.net>
Thu, 29 May 2003 00:12:18 +0000
(
00:12
+0000)
glft/font.c
patch
|
blob
|
history
glft/render.c
patch
|
blob
|
history
diff --git
a/glft/font.c
b/glft/font.c
index db748ba296f2b09696712e97a74369a79b5fddb1..3c1b33afd8f813844f9225b465c619501e6355fc 100644
(file)
--- a/
glft/font.c
+++ b/
glft/font.c
@@
-255,7
+255,7
@@
struct GlftGlyph *GlftFontGlyph(struct GlftFont *font, const char *c)
}
g->height = -(font->face->glyph->metrics.height >> 6);
- g_hash_table_insert(font->glyph_map, &g->w,
&
g);
+ g_hash_table_insert(font->glyph_map, &g->w, g);
}
return g;
diff --git
a/glft/render.c
b/glft/render.c
index 2da342c5858da280a5992caf72dda2214ae1fdbe..5bb2711ed1d59500bd8f87186afd951f6ec4a2bc 100644
(file)
--- a/
glft/render.c
+++ b/
glft/render.c
@@
-93,7
+93,7
@@
void GlftRenderString(struct GlftFont *font, const char *str, int bytes,
glPushMatrix();
c = str;
- while (c) {
+ while (c
- str < bytes
) {
g = GlftFontGlyph(font, c);
if (g) {
glCallList(g->dlist);
@@
-101,7
+101,6
@@
void GlftRenderString(struct GlftFont *font, const char *str, int bytes,
} else
glTranslatef(font->max_advance_width, 0.0, 0.0);
c = g_utf8_next_char(c);
- if (c - str >= bytes) break;
}
glPopMatrix();