aboutsummaryrefslogtreecommitdiff
path: root/console-tools/loadfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/loadfont.c')
-rw-r--r--console-tools/loadfont.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 927c2bad4..e93ca3186 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -102,12 +102,8 @@ do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize)
102 u_short unicode; 102 u_short unicode;
103 103
104 maxct = tailsz; /* more than enough */ 104 maxct = tailsz; /* more than enough */
105 up = (struct unipair *) malloc(maxct * sizeof(struct unipair)); 105 up = (struct unipair *) xmalloc(maxct * sizeof(struct unipair));
106 106
107 if (!up) {
108 errorMsg("Out of memory?\n");
109 exit(1);
110 }
111 for (glyph = 0; glyph < fontsize; glyph++) { 107 for (glyph = 0; glyph < fontsize; glyph++) {
112 while (tailsz >= 2) { 108 while (tailsz >= 2) {
113 unicode = (((u_short) inbuf[1]) << 8) + inbuf[0]; 109 unicode = (((u_short) inbuf[1]) << 8) + inbuf[0];