mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
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
e1603e453d
commit
cf0ad320e4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37327
@ -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