Fix index-out-of-range compilation error

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18299 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2009-09-07 14:16:20 +00:00
parent ad1deff3f5
commit 989a1e4631

View File

@ -756,8 +756,8 @@ gnc_account_get_full_name (const Account *account)
if (!account) return NULL;
name = xaccAccountGetFullName (account);
strncpy( result, name, sizeof(result)-1 );
result[sizeof(result)] = '\0';
strncpy( result, name, sizeof(result)-2 );
result[sizeof(result)-1] = '\0';
return result;
}