chiark / gitweb /
Fix string_copy macro to use sizeof(src) for the source buffer
authorJonas Fonseca <fonseca@diku.dk>
Sat, 2 Jun 2007 16:18:24 +0000 (18:18 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Sat, 2 Jun 2007 16:24:10 +0000 (18:24 +0200)
tig.c

diff --git a/tig.c b/tig.c
index e918fe63900d592799dec3bcd85eb2ac72909662..ba1ad3d6b002c0c2116651162209793e75590226 100644 (file)
--- 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)