Skip to content

Commit 885b556

Browse files
authored
metal : fix ggml_metal_log vargs (#1606)
1 parent 9521ba6 commit 885b556

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ggml-metal.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ static void ggml_metal_log(enum ggml_log_level level, const char * format, ...){
177177
ggml_metal_log_callback(level, buffer, ggml_metal_log_user_data);
178178
} else {
179179
char* buffer2 = malloc(len+1);
180+
va_end(args);
181+
va_start(args, format);
180182
vsnprintf(buffer2, len+1, format, args);
181183
buffer2[len] = 0;
182184
ggml_metal_log_callback(level, buffer2, ggml_metal_log_user_data);

0 commit comments

Comments
 (0)