diff --git a/CHANGELOG.md b/CHANGELOG.md index 70e16de93..88260ce6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,11 @@ miniSphere Changelog vX.X.X - TBD ------------ -* Fixes a bug where legacy `Spriteset#filename` includes a SphereFS prefix. * Fixes a bug in the internal audio streaming logic which corrupted the output of SoundStreams with more than one channel and made them sound choppy. +* Fixes a bug where legacy `Spriteset#filename` includes a SphereFS prefix. +* Fixes a bug where Cell will write an invalid script path to `game.sgm` if the + script filename includes the `@/` prefix. v4.8.1 - August 14, 2017 diff --git a/src/cell/build.c b/src/cell/build.c index 16cd7707b..69b2003cc 100644 --- a/src/cell/build.c +++ b/src/cell/build.c @@ -857,12 +857,12 @@ sort_targets_by_path(const void* p_a, const void* p_b) static bool write_manifests(build_t* build) { + path_t* base_path; duk_context* ctx; FILE* file; int height; size_t json_size; const char* json_text; - path_t* origin; path_t* script_path; int width; @@ -914,10 +914,10 @@ write_manifests(build_t* build) visor_end_op(build->visor); return false; } - script_path = path_new(duk_to_string(ctx, -1)); - origin = path_new("scripts/"); - path_relativize(script_path, origin); - path_free(origin); + script_path = fs_build_path(duk_to_string(ctx, -1), "@/"); + base_path = path_new("@/scripts/"); + path_relativize(script_path, base_path); + path_free(base_path); // write game.sgm (SGMv1, for compatibility with Sphere 1.x) file = fs_fopen(build->fs, "@/game.sgm", "wb"); diff --git a/src/minisphere/audio.c b/src/minisphere/audio.c index 8990523f9..1c9da933d 100644 --- a/src/minisphere/audio.c +++ b/src/minisphere/audio.c @@ -117,9 +117,9 @@ audio_init(void) return; } al_init_acodec_addon(); - s_active_streams = vector_new(sizeof(stream_t*)); s_active_samples = vector_new(sizeof(struct sample_instance)); s_active_sounds = vector_new(sizeof(sound_t*)); + s_active_streams = vector_new(sizeof(stream_t*)); } void