diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b64ee92..2779b0f 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -2,16 +2,17 @@ name: Comprehensive Tests on: push: - branches: [ "main", "dev" ] + branches: [ "main" ] pull_request: branches: [ "main" ] + workflow_dispatch: jobs: test-valgrind: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: install valgrind run: sudo apt install valgrind - name: make test (valgrind) @@ -21,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: make test (sanitized) run: make test-sanitized @@ -29,6 +30,6 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: make test (mingw32) run: make test diff --git a/LICENSE.md b/LICENSE.md index 33c634d..e3000f0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # License -Copyright (c) 2020-2023 Kayne Ruse, KR Game Studios +Copyright (c) 2020-2024 Kayne Ruse, KR Game Studios This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. diff --git a/source/toy_literal.c b/source/toy_literal.c index ecc298f..d9ce3f6 100644 --- a/source/toy_literal.c +++ b/source/toy_literal.c @@ -455,7 +455,7 @@ static void printToBuffer(const char* str) { globalPrintBuffer = TOY_GROW_ARRAY(char, globalPrintBuffer, oldCapacity, globalPrintCapacity); } - size_t total = snprintf(globalPrintBuffer + globalPrintCount, strlen(str) + 1, "%s", str ? str : ""); + size_t total = snprintf(globalPrintBuffer + globalPrintCount, strlen(str) + 1, "%s", str ? str : "\0"); globalPrintCount += total; } diff --git a/source/toy_memory.c b/source/toy_memory.c index 9975b94..040c491 100644 --- a/source/toy_memory.c +++ b/source/toy_memory.c @@ -22,7 +22,7 @@ void* Toy_private_defaultMemoryAllocator(void* pointer, size_t oldSize, size_t n void* mem = realloc(pointer, newSize); if (mem == NULL) { - fprintf(stderr, TOY_CC_ERROR "[internal] Memory allocation error (requested %zu, replacing %zu)\n" TOY_CC_RESET, newSize, oldSize); + fprintf(stderr, TOY_CC_ERROR "[internal] Memory allocation error (requested %d, replacing %d)\n" TOY_CC_RESET, (int)newSize, (int)oldSize); return NULL; }