Skip to content

Commit

Permalink
Clear world/board name buffers on world/board creation
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceLR committed Sep 27, 2020
1 parent bffdaa5 commit 5b5bbf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/editor/board.c
Expand Up @@ -223,8 +223,9 @@ struct board *create_blank_board(struct editor_config_info *conf)
int layer_size = conf->board_width * conf->board_height;
int i;

memset(cur_board->board_name, 0, sizeof(cur_board->board_name));

cur_board->size = 0;
cur_board->board_name[0] = 0;
cur_board->board_width = conf->board_width;
cur_board->board_height = conf->board_height;
cur_board->overlay_mode = conf->overlay_enabled;
Expand Down
2 changes: 1 addition & 1 deletion src/editor/world.c
Expand Up @@ -460,7 +460,7 @@ void create_blank_world(struct world *mzx_world)
mzx_world->status_counters_shown[i][0] = 0;
}

mzx_world->name[0] = 0;
memset(mzx_world->name, 0, sizeof(mzx_world->name));

// Defaults for things set by load_world
mzx_world->custom_sfx_on = 0;
Expand Down

0 comments on commit 5b5bbf0

Please sign in to comment.