Fixed my last commit

This commit is contained in:
Kris Maglione 2006-06-23 02:52:03 -04:00
parent 94226889e9
commit 2f7674d31a
2 changed files with 4 additions and 2 deletions

View File

@ -291,8 +291,9 @@ message_root(char *message)
}if(!strncmp(message, "testtags ", 9)) {
message += 9;
free(def.testtags);
def.testtags = strdup(message);
def.testtags = strlen(message) ? strdup(message) : nil;
draw_frames();
return nil;
}
return Ebadcmd;
}

View File

@ -60,7 +60,8 @@ xget_fontmetric(BlitzInput *i, int *x, int *y, unsigned int *w, unsigned int *h)
{
*w = i->font->rbearing - i->font->lbearing;
*h = i->font->ascent + i->font->descent;
*x = i->rect.x + (i->rect.width - *w) / 2;;
/* XXX: This is a temporary hack */
*x = i->rect.x + (i->rect.height - *h) / 2 + i->font->rbearing;
*y = i->rect.y + (i->rect.height - *h) / 2 + i->font->ascent;
}