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.
This commit is contained in:
parent
7d1739d740
commit
306efecea6
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user