Made some minor modifications

This commit is contained in:
2024-02-16 18:26:02 +01:00
parent d925445876
commit 332f5ccfd0
5 changed files with 23 additions and 29 deletions

View File

@@ -23,8 +23,10 @@ char* format(const char* fmt, ...) {
va_end(args);
if (length <= 0)
if (length <= 0) {
log_message(LOG_ERROR, "Failed to calculate the length of the formatted string.");
return NULL;
}
// Allocate a buffer for the formatted string
char* buffer = calloc(length, sizeof(char));