From 3606c7efbd0c1e25825c9c5e245fd1da806634eb Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 14 Mar 2007 17:39:38 +0000 Subject: Allow strn0cpy to fill all bytes --- config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index 08670a48..4fb4bafc 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.27 2007-03-14 17:08:07 phintuka Exp $ + * $Id: config.c,v 1.28 2007-03-14 17:39:38 phintuka Exp $ * */ @@ -21,8 +21,8 @@ #define STRN0CPY(dst, src) \ do { \ - strn0cpy(dst, src, sizeof(dst)-1); \ - if(strlen(src) > sizeof(dst)-1) \ + strn0cpy(dst, src, sizeof(dst)); \ + if(strlen(src) >= sizeof(dst)) \ LOGMSG("WARNING: Setting %s truncated to %s !", Name, dst); \ } while(0) -- cgit v1.2.3