--- ../sfco/welecw2000a/fpga/nios/fpga/nios/osoz/platform/nios/src/text.c	2012-01-23 02:51:25.171084200 +0100
+++ platform/nios/src/text.c	2012-02-04 19:20:15.961628500 +0100
@@ -45,15 +45,15 @@
 
 	fnLcdGlyph = glyphFn[drawMode]; // depending on mode, select the function to use
 
-	while ((ch = *string++) != '\0') // loop until zero terminated
+    while ((ch = (uint8_t)*string++) != '\0') // loop until zero terminated
 	{
 		const uint8_t* glyph;
 		uint32_t width;
 
-		ch -= font->firstchar; // offset to get the glyph number 
+        ch -= font->firstchar; // offset to get the glyph number
 		// (nice side effect of 'ch' being unsigned: wraps to something huge if 
 		//  smaller than font->firstchar, so below check will catch that, too)
-		
+
 		if (ch >= font->numchars) // char in valid table range?
 		{	// no, skip
 			continue;
@@ -64,7 +64,6 @@
 		{	// not present, skip
 			continue;
 		}
-		
 		glyph = font->pBits + font->pOffset[ch];
 		
 		fnLcdGlyph(plane, x, y, glyph, width, height);
@@ -83,7 +82,7 @@
 	uint32_t pixelLen = 0; // later return value
 
 	uint32_t ch;
-	while ((ch = *string++) != '\0') // loop until zero terminated
+    while ((ch = (uint8_t)*string++) != '\0') // loop until zero terminated
 	{
 		uint32_t width;
 
