From 751e27c90eea47b4eacdd7b657731712712f7356 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 2 Jun 2007 18:18:24 +0200 Subject: [PATCH] Fix string_copy macro to use sizeof(src) for the source buffer --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index e918fe6..ba1ad3d 100644 --- a/tig.c +++ b/tig.c @@ -169,7 +169,7 @@ string_ncopy_do(char *dst, size_t dstlen, const char *src, size_t srclen) /* Shorthands for safely copying into a fixed buffer. */ #define string_copy(dst, src) \ - string_ncopy_do(dst, sizeof(dst), src, sizeof(dst)) + string_ncopy_do(dst, sizeof(dst), src, sizeof(src)) #define string_ncopy(dst, src, srclen) \ string_ncopy_do(dst, sizeof(dst), src, srclen) -- 2.30.2