*/
#include "libegint.h"
+//#include "../refind/screen.h"
#include "egemb_font.h"
#define FONT_CELL_WIDTH (7)
UINTN BufferLineOffset, FontLineOffset;
UINTN TextLength;
UINTN i, c;
-
+
// clip the text
- TextLength = StrLen(Text);
+ if (Text)
+ TextLength = StrLen(Text);
+ else
+ TextLength = 0;
+
if (TextLength * FONT_CELL_WIDTH + PosX > CompImage->Width)
TextLength = (CompImage->Width - PosX) / FONT_CELL_WIDTH;
// load the font
if (FontImage == NULL)
FontImage = egPrepareEmbeddedImage(&egemb_font, TRUE);
-
+
// render it
BufferPtr = CompImage->PixelData;
BufferLineOffset = CompImage->Width;