--- xmlhelp/source/com/sun/star/help/HelpLinker.cxx
+++ xmlhelp/source/com/sun/star/help/HelpLinker.cxx
@@ -413,7 +413,7 @@ int readInt(std::fstream &in)
 {
     HCDBG(std::cerr << "want to read at " << in.tellg() << std::endl);
     int ret = 0;
-    for (char i = 3; i >= 0; --i)
+    for (signed char i = 3; i >= 0; --i)
     {
         unsigned char byte;
         in.read( (char*)&byte, 1 ); 
