summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0scar <qgt268@alumni.ku.dk>2024-08-01 10:35:41 +0000
committer0scar <qgt268@alumni.ku.dk>2024-08-01 10:35:41 +0000
commit7c1c9e9a54ead44c5f1142aae5a71a53d59bcd06 (patch)
tree96bf77b50d7a2ef7b802fe09ba4cce53420bf24a
parentfc08d62709fb9c3e00c9e37c6c9c5a54ecae7e99 (diff)
Fix realloc on ptr ptr
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/rendering/src/rendering.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 658d360..f6ce42c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,6 +83,7 @@ set(ENGINE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(ENGINE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(ENGINE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(ENGINE_VERSION_TWEAK ${GIT_SHA})
+set(ENGINE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-${GIT_SHA}")
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(ENGINE_BUILD_TYPE "default")
@@ -133,7 +134,7 @@ endif()
include(DawAddState)
message("Configured ${PROJECT_NAME} ${PROJECT_VERSION}")
-message("version: ${ENGINE_VERSION_MAJOR}.${ENGINE_VERSION_MINOR}.${ENGINE_VERSION_PATCH}-${ENGINE_VERSION_TWEAK} (${ENGINE_BUILD_TYPE} build)")
+message("version: ${ENGINE_VERSION} (${ENGINE_BUILD_TYPE} build)")
message("enable debug: ${DAW_BUILD_DEBUG}")
message("enable hotreload: ${DAW_BUILD_HOTRELOAD}")
message("enable asan: ${DAW_BUILD_ASAN}")
diff --git a/src/rendering/src/rendering.c b/src/rendering/src/rendering.c
index 06880fd..1ce3997 100644
--- a/src/rendering/src/rendering.c
+++ b/src/rendering/src/rendering.c
@@ -122,7 +122,7 @@ int renderbatch_add(RenderBatch* renderbatch, RenderObject* obj) {
// Check if there's room enough
} else if ((renderbatch->mcount + 1) * sizeof(RenderObject) > renderbatch->msize) {
const isize sz = renderbatch->msize * 2;
- renderbatch->models = realloc(&(renderbatch->models), sz);
+ renderbatch->models = realloc(renderbatch->models, sz);
renderbatch->msize = sz;
}