Skip to content

Commit 1bd5018

Browse files
committed
metal : minor fix [no ci]
1 parent 5f71096 commit 1bd5018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-metal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
ctx->support_simdgroup_mm = [ctx->mtl_device supportsFamily:MTLGPUFamilyApple7];
6262

63-
strncpy(ctx->name, [[ctx->mtl_device name] UTF8String], sizeof(ctx->name));
63+
strncpy(ctx->name, [[ctx->mtl_device name] UTF8String], sizeof(ctx->name) - 1);
6464
}
6565

6666
ctx->mtl_device_ref_count++;

0 commit comments

Comments
 (0)