mirror of
https://github.com/xtreme8000/CavEX.git
synced 2025-01-22 09:11:55 -05:00
Fix wrong string printf usage
This commit is contained in:
parent
76998a7234
commit
c26461f455
2 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ bool level_archive_create(struct level_archive* la, string_t filename) {
|
|||
assert(la && filename);
|
||||
|
||||
string_t tmp;
|
||||
string_init_printf(tmp, "saves/%s/level.dat", filename);
|
||||
string_init_printf(tmp, "saves/%s/level.dat", string_get_cstr(filename));
|
||||
char* c_tmp = string_clear_get_str(tmp);
|
||||
|
||||
if(!c_tmp)
|
||||
|
|
|
@ -70,10 +70,10 @@ bool region_archive_create_new(struct region_archive* ra, string_t world_name,
|
|||
|
||||
if(dimension == WORLD_DIM_OVERWORLD) {
|
||||
string_init_printf(ra->file_name, "saves/%s/region/r.%i.%i.mcr",
|
||||
world_name, x, z);
|
||||
string_get_cstr(world_name), x, z);
|
||||
} else {
|
||||
string_init_printf(ra->file_name, "saves/%s/DIM-1/region/r.%i.%i.mcr",
|
||||
world_name, x, z);
|
||||
string_get_cstr(world_name), x, z);
|
||||
}
|
||||
|
||||
FILE* f = fopen(string_get_cstr(ra->file_name), "w");
|
||||
|
@ -111,10 +111,10 @@ bool region_archive_create(struct region_archive* ra, string_t world_name,
|
|||
|
||||
if(dimension == WORLD_DIM_OVERWORLD) {
|
||||
string_init_printf(ra->file_name, "saves/%s/region/r.%i.%i.mcr",
|
||||
world_name, x, z);
|
||||
string_get_cstr(world_name), x, z);
|
||||
} else {
|
||||
string_init_printf(ra->file_name, "saves/%s/DIM-1/region/r.%i.%i.mcr",
|
||||
world_name, x, z);
|
||||
string_get_cstr(world_name), x, z);
|
||||
}
|
||||
|
||||
ra->x = x;
|
||||
|
|
Loading…
Reference in a new issue