* as/hc08/lkaomf51.c (OutputName): made name unsigned char,
[fw/sdcc] / as / mcs51 / lkaomf51.c
index 82dccb3e8c0232aa5beb8fbd7b8c05afb5dc1ab9..812c616f0963735bbe74324f5f8c939075e60880 100644 (file)
@@ -209,7 +209,7 @@ void OutputWord(int value)
        OutputByte((unsigned char)(value/0x100));
 }
 
-void OutputName(char * name)
+void OutputName(unsigned char * name)
 {
        int k;
        OutputByte((unsigned char)strlen(name));
@@ -876,12 +876,12 @@ void CollectInfoFromCDB(void)
        fclose(CDBin);
 }
 
-int hex2dec (char hex_digit)
+int hex2dec (unsigned char hex_digit)
 {
-   int j;
-   j=toupper(hex_digit)-'0';
-   if (j>9) j -= 7;
-   return j;
+   if (isdigit (hex_digit))
+      return hex_digit-'0';
+   else
+      return toupper (hex_digit)-'A'+10;
 }
 
 unsigned char GetByte(char * buffer)