summaryrefslogtreecommitdiffstats
path: root/usr.bin/doscmd
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-07-02 05:12:53 +0000
committerimp <imp@FreeBSD.org>1998-07-02 05:12:53 +0000
commit3dee339f84ff499afaa4677cfd0c21435ea1dfbd (patch)
tree5640572dc01e7085864ee4a1b03d38953f3b4e8f /usr.bin/doscmd
parent2bf9f0966d281ff87e47b459121ff753c7ec14cc (diff)
downloadFreeBSD-src-3dee339f84ff499afaa4677cfd0c21435ea1dfbd.zip
FreeBSD-src-3dee339f84ff499afaa4677cfd0c21435ea1dfbd.tar.gz
o fix bug in conversion of DOS 32-bit signed number to FreeBSD's 64-bit
off_t. This fixed the primitive 'copy protection' that the program I'm using.
Diffstat (limited to 'usr.bin/doscmd')
-rw-r--r--usr.bin/doscmd/dos.c4
-rw-r--r--usr.bin/doscmd/intff.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/doscmd/dos.c b/usr.bin/doscmd/dos.c
index 88d2b70..7d79c2f 100644
--- a/usr.bin/doscmd/dos.c
+++ b/usr.bin/doscmd/dos.c
@@ -31,7 +31,7 @@
*
* BSDI int21.c,v 2.2 1996/04/08 19:32:51 bostic Exp
*
- * $Id: dos.c,v 1.1 1997/08/09 01:42:40 dyson Exp $
+ * $Id: dos.c,v 1.2 1998/07/01 19:56:13 imp Exp $
*/
#include "doscmd.h"
@@ -1345,7 +1345,7 @@ int21_42(regcontext_t *REGS)
int whence;
off_t offset;
- offset = ((off_t)R_CX << 16) + R_DX;
+ offset = (off_t) ((int) (R_CX << 16) + R_DX);
switch (R_AL) {
case 0:
whence = SEEK_SET;
diff --git a/usr.bin/doscmd/intff.c b/usr.bin/doscmd/intff.c
index 5035a1f..ae86ac5 100644
--- a/usr.bin/doscmd/intff.c
+++ b/usr.bin/doscmd/intff.c
@@ -29,7 +29,7 @@
*
* BSDI intff.c,v 2.2 1996/04/08 19:32:56 bostic Exp
*
- * $Id: intff.c,v 1.2 1997/09/30 22:03:57 jlemon Exp $
+ * $Id: intff.c,v 1.3 1998/07/01 19:56:17 imp Exp $
*/
#include "doscmd.h"
@@ -450,7 +450,7 @@ int2f11_lseek(regcontext_t *REGS)
off_t offset;
fd = r_sft->fd;
- offset = (R_CX << 16) + R_DX;
+ offset = (off_t) ((int) ((R_CX << 16) + R_DX);
debug(D_REDIR,"lseek(%d, 0x%qx, SEEK_END)\n", fd, offset);
OpenPOWER on IntegriCloud