From 25723853df2f4446dfb1d9fb931ab0f8266054e9 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 31 Jul 2024 21:49:17 -0500 Subject: [PATCH] Bugfix: The build_name and version numbers should not support forward or backward slashes. This utilizes the logic from the "stage" setting that strips out invalid slashes. The standard is updated accordingly to make this behavior more explicit. --- level_3/fake/c/main/build/load.c | 20 ++++++++++---------- level_3/fake/specifications/settings.txt | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index a089a60..127c3b6 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -570,7 +570,7 @@ extern "C" { memset(settings_mode_names, 0, sizeof(f_string_static_t) * fake_build_setting_total_d); - bool found = F_false; + uint8_t found = F_false; for (; i < modes->used; ++i) { @@ -1084,7 +1084,7 @@ extern "C" { 3, // build_compiler 3, // build_indexer 4, // build_language - 3, // build_name + 6, // build_name 1, // build_script 1, // build_shared 1, // build_static @@ -1114,14 +1114,14 @@ extern "C" { 1, // search_static 6, // stage 5, // version_file - 3, // version_major - 3, // version_major_prefix - 3, // version_micro - 3, // version_micro_prefix - 3, // version_minor - 3, // version_minor_prefix - 3, // version_nano - 3, // version_nano_prefix + 6, // version_major + 6, // version_major_prefix + 6, // version_micro + 6, // version_micro_prefix + 6, // version_minor + 6, // version_minor_prefix + 6, // version_nano + 6, // version_nano_prefix 5, // version_target }; diff --git a/level_3/fake/specifications/settings.txt b/level_3/fake/specifications/settings.txt index 3dc010e..9a94ef2 100644 --- a/level_3/fake/specifications/settings.txt +++ b/level_3/fake/specifications/settings.txt @@ -27,7 +27,7 @@ Settings Specification: - code:"build_libraries": Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" bold:"Object". - code:"build_libraries_shared": Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" bold:"Object". - code:"build_libraries_static": Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" bold:"Object". - - code:"build_name": Must only contain characters allowed in a filename. + - code:"build_name": Must only contain characters allowed in a filename (no slashes allowed). - code:"build_objects_library": Must only contain any number of valid object file names relative to the appropriate code:"path_object_*" path. - code:"build_objects_library_shared": Must only contain any number of valid object file names relative to the code:"path_object_shared" path. - code:"build_objects_library_static": Must only contain any number of valid object file names relative to the code:"path_object_static" path. @@ -106,14 +106,14 @@ Settings Specification: - code:"search_static": Must only one of: code:"yes" or code:"no". - code:"stage": Only zero or one bold:"Content", which represents the build stage name (case-sensitive) (no slashes allowed). - code:"version_file": Must only be one of: code:"major", code:"minor", code:"micro", or code:"nano". - - code:"version_major": Must only be a single value containing valid filename characters. - - code:"version_major_prefix": Must be zero or more valid filename characters. - - code:"version_micro": Must only be a single value containing valid filename characters. - - code:"version_micro_prefix": Must be zero or more valid filename characters. - - code:"version_minor": Must only be a single value containing valid filename characters. - - code:"version_minor_prefix": Must be zero or more valid filename characters. - - code:"version_nano": Must only be a single value containing valid filename characters. - - code:"version_nano_prefix": Must be zero or more valid filename characters. + - code:"version_major": Must only be a single value containing valid filename characters (no slashes allowed). + - code:"version_major_prefix": Must be zero or more valid filename characters (no slashes allowed). + - code:"version_micro": Must only be a single value containing valid filename characters (no slashes allowed). + - code:"version_micro_prefix": Must be zero or more valid filename characters (no slashes allowed). + - code:"version_minor": Must only be a single value containing valid filename characters (no slashes allowed). + - code:"version_minor_prefix": Must be zero or more valid filename characters (no slashes allowed). + - code:"version_nano": Must only be a single value containing valid filename characters (no slashes allowed). + - code:"version_nano_prefix": Must be zero or more valid filename characters (no slashes allowed). - code:"version_target": Must only be one of: code:"major", code:"minor", code:"micro", or code:"nano". All bold:"Object" names support having a code:"-" and a code:"mode" name, such as code:"build_libraries-individual" for a mode called code:"individual", except for the code:"modes" and the code:"modes_default" bold:"Object" names. -- 1.8.3.1