diff --git a/tools/winebuild/res16.c b/tools/winebuild/res16.c
index c8dcf1e3e66d9009d6e90de51a2e962cf71cb6a5..99e5cd31f19d615dd9ba5a95b61e475bf749d840 100644
--- a/tools/winebuild/res16.c
+++ b/tools/winebuild/res16.c
@@ -142,7 +142,7 @@ static void get_string( struct string_id *str )
     }
     else
     {
-        char *p = xmalloc( (strlen((char*)file_pos) + 1) );
+        char *p = xmalloc(strlen((const char *)file_pos) + 1);
         str->str = p;
         str->id = 0;
         while ((*p++ = get_byte()));