summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 55d571767..f4124eab8 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1652,8 +1652,8 @@ int map_cache_read(struct map_data *m) {
static int map_cache_write(struct map_data *m) {
int i;
- unsigned long len_new , len_old;
- char *write_buf;
+ unsigned long len_new, len_old;
+ unsigned char *write_buf;
if(!map_cache.fp) { return 0; }
for(i = 0;i < map_cache.head.nmaps ; i++) {
if(!strcmp(m->name,map_cache.map[i].fn)) {
@@ -1669,7 +1669,7 @@ static int map_cache_write(struct map_data *m) {
if(map_read_flag >= READ_FROM_BITMAP_COMPRESSED) {
// 圧縮保存
// さすがに2倍に膨れる事はないという事で
- write_buf = (char*)aMallocA(m->xs * m->ys * 2);
+ write_buf = (unsigned char*)aMallocA(m->xs * m->ys * 2);
len_new = m->xs * m->ys * 2;
encode_zip(write_buf,&len_new,m->gat,m->xs * m->ys);
map_cache.map[i].compressed = 1;
@@ -1706,7 +1706,7 @@ static int map_cache_write(struct map_data *m) {
if(map_cache.map[i].fn[0] == 0) {
// 新しい場所に登録
if(map_read_flag >= READ_FROM_BITMAP_COMPRESSED) {
- write_buf = (char*)aMallocA(m->xs * m->ys * 2);
+ write_buf = (unsigned char*)aMallocA(m->xs * m->ys * 2);
len_new = m->xs * m->ys * 2;
encode_zip(write_buf,&len_new,m->gat,m->xs * m->ys);
map_cache.map[i].compressed = 1;
@@ -1929,7 +1929,7 @@ static int map_readmap(int m,char *fn, char *alias, int *map_cache, int maxmap)
struct gat_1cell {float high[4]; int type;} *p=NULL;
// read & convert fn
// again, might not need to be unsigned char
- gat = grfio_read(fn);
+ gat = (char*)grfio_read(fn);
if(gat==NULL) {
return -1;
// さすがにマップが読めないのはまずいので終了する