Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/ntfstools
In directory usw-pr-cvs1:/tmp/cvs-serv7030/ntfstools
Modified Files:
mkntfs.c
Log Message:
Fix run list corruption stupidity.
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/mkntfs.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -U2 -r1.29 -r1.30
--- mkntfs.c 2001/06/12 22:39:35 1.29
+++ mkntfs.c 2001/06/13 00:13:38 1.30
@@ -907,4 +907,5 @@
return -1;
*dest++ = l & 0xffLL;
+// printf("writing byte 0x%x\n", *(dest - 1));
l >>= 8;
// printf("dest = %x\n", dest);
@@ -914,7 +915,12 @@
j = (n >> 8 * (i - 1)) & 0xff;
/* If the sign bit is wrong, we need one more byte. */
- if ((n < 0LL && j >= 0) || (n > 0LL && j < 0)) {
+ if (n < 0LL && j >= 0) {
i++;
- *dest = j;
+ *dest = (char)-1;
+// printf("writing extra byte 0x%x\n", *dest);
+ } else if (n > 0LL && j < 0) {
+ i++;
+ *dest = (char)0;
+// printf("writing extra byte 0x%x\n", *dest);
}
// printf("wrote %i bytes\n", i);
|