Made some minor modifications
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user