From fb156edd1ae8fa8308df96eac76f445e2dd9fce4 Mon Sep 17 00:00:00 2001 From: "(none)!yura" <(none)!yura> Date: Mon, 18 Oct 2004 19:35:46 +0000 Subject: [PATCH] fix stupid bug in ntfs_attr_truncate (Logical change 1.619) --- libntfs/attrib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index 8e44ed85..4290406b 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -4296,7 +4296,8 @@ put_err_out: */ int ntfs_attr_truncate(ntfs_attr *na, const s64 newsize) { - if (!na || newsize < 0 || (na->ni == FILE_MFT && na->type == AT_DATA)) { + if (!na || newsize < 0 || + (na->ni->mft_no == FILE_MFT && na->type == AT_DATA)) { Dprintf("%s(): Invalid aruments passed.\n", __FUNCTION__); errno = EINVAL; return -1;