bug 427642 fix: error with files like ./file.asm
[fw/sdcc] / as / z80 / assym.c
index 3aba5c280b7f6cba7bc25ded1968d185e026127b..1ef7cc7675e9fdee89a542ec5a994e0c571c1f92 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
-
-#if defined(_MSC_VER)
 #include <malloc.h>
-#else
-#include <alloc.h>
-#endif
-
 #include "asm.h"
 
 /*)Module      assym.c
@@ -359,7 +353,7 @@ register char *p1, *p2;
                if (*p1++ != *p2++)
                        return (0);
 #else
-               if (ccase[*p1++] != ccase[*p2++])
+               if (ccase[(unsigned char)(*p1++)] != ccase[(unsigned char)(*p2++)])
                        return (0);
 #endif
 
@@ -402,7 +396,7 @@ register char *p;
 #if    CASE_SENSITIVE
                h += *p++;
 #else
-               h += ccase[*p++];
+               h += ccase[(unsigned char)(*p++)];
 #endif
 
        } while (--n);