diff --git a/cinera/cinera.c b/cinera/cinera.c index 7c00832..a9e20e2 100644 --- a/cinera/cinera.c +++ b/cinera/cinera.c @@ -1,10 +1,16 @@ #if 0 -ctime -begin ${0%.*}.ctm +if [ $(command -v ctime 2>/dev/null) ]; then + ctime -begin ${0%.*}.ctm +fi + #gcc -g -fsanitize=address -Wall -std=c99 -pipe $0 -o ${0%.*} hmml.a -lcurl gcc -O2 -Wall -std=c99 -pipe $0 -o ${0%.*} hmml.a -lcurl #clang -fsanitize=address -g -Wall -std=c99 -pipe $0 -o ${0%.*} hmml.a -lcurl #clang -O2 -Wall -std=c99 -pipe $0 -o ${0%.*} hmml.a -lcurl -ctime -end ${0%.*}.ctm + +if [ $(command -v ctime 2>/dev/null) ]; then + ctime -end ${0%.*}.ctm +fi exit #endif @@ -17,7 +23,7 @@ typedef struct version CINERA_APP_VERSION = { .Major = 0, .Minor = 7, - .Patch = 5 + .Patch = 6 }; #include // NOTE(matt): varargs @@ -10962,7 +10968,8 @@ typedef struct void OffsetAssociatedIndex(asset_index_and_location *AssetDeletionRecords, int AssetDeletionRecordCount, int32_t *Index) { - fprintf(stderr, "Possibly offsetting associated index\n"); + // TODO(matt): Do we really need to print this? + //fprintf(stderr, "Possibly offsetting associated index\n"); for(int i = AssetDeletionRecordCount - 1; i >= 0; --i) { if(*Index > AssetDeletionRecords[i].Index) diff --git a/cinera/cinera_config.c b/cinera/cinera_config.c index 094aec0..1cb105c 100644 --- a/cinera/cinera_config.c +++ b/cinera/cinera_config.c @@ -2908,19 +2908,22 @@ string StripSlashes(string Path, path_relativity Relativity) { string Result = Path; - if(Relativity == P_REL) + if(Path.Length > 0) { - while(*Result.Base == '/') + if(Relativity == P_REL) + { + while(*Result.Base == '/') + { + ++Result.Base; + --Result.Length; + } + } + + while(Result.Base[Result.Length - 1] == '/') { - ++Result.Base; --Result.Length; } } - - while(Result.Base[Result.Length - 1] == '/') - { - --Result.Length; - } return Result; }