version 1.115 | | version 1.116 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.115 2006/08/19 20:22:21 ryo_saeba Exp $"; | | * "$Id: map.c,v 1.116 2006/08/25 18:45:04 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
static mapstruct *load_and_link_tiled_map(mapstruct *orig_map, int tile_num) | | static mapstruct *load_and_link_tiled_map(mapstruct *orig_map, int tile_num) |
{ | | { |
int dest_tile = (tile_num +2) % 4; | | int dest_tile = (tile_num +2) % 4; |
char *path = path_combine_and_normalize(orig_map->path, orig_map->tile_path[tile_num]); | | char path[HUGE_BUF]; |
| | path[0] = '\0'; |
| | strncpy(path, path_combine_and_normalize(orig_map->path, orig_map->tile_path[tile_num]), HUGE_BUF - 1); |
| | path[HUGE_BUF-1] = '\0'; |
| | |
orig_map->tile_map[tile_num] = ready_map_name(path, 0); | | orig_map->tile_map[tile_num] = ready_map_name(path, 0); |
| | |