mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
krnl386.exe16: Avoid hardcoding array lengths.
This commit is contained in:
parent
954e6eba7e
commit
ebf4ae03b5
3 changed files with 5 additions and 5 deletions
|
@ -336,7 +336,7 @@ static BYTE INT21_MapDrive( BYTE drive )
|
||||||
{
|
{
|
||||||
if (drive)
|
if (drive)
|
||||||
{
|
{
|
||||||
WCHAR drivespec[3] = {'A', ':', 0};
|
WCHAR drivespec[] = {'A', ':', 0};
|
||||||
UINT drivetype;
|
UINT drivetype;
|
||||||
|
|
||||||
drivespec[0] += drive - 1;
|
drivespec[0] += drive - 1;
|
||||||
|
@ -359,7 +359,7 @@ static BYTE INT21_MapDrive( BYTE drive )
|
||||||
*/
|
*/
|
||||||
static void INT21_SetCurrentDrive( BYTE drive )
|
static void INT21_SetCurrentDrive( BYTE drive )
|
||||||
{
|
{
|
||||||
WCHAR drivespec[3] = {'A', ':', 0};
|
WCHAR drivespec[] = {'A', ':', 0};
|
||||||
|
|
||||||
drivespec[0] += drive;
|
drivespec[0] += drive;
|
||||||
|
|
||||||
|
@ -2451,7 +2451,7 @@ static void INT21_Ioctl_Block( CONTEXT *context )
|
||||||
{
|
{
|
||||||
BYTE *dataptr;
|
BYTE *dataptr;
|
||||||
BYTE drive = INT21_MapDrive( BL_reg(context) );
|
BYTE drive = INT21_MapDrive( BL_reg(context) );
|
||||||
WCHAR drivespec[4] = {'A', ':', '\\', 0};
|
WCHAR drivespec[] = {'A', ':', '\\', 0};
|
||||||
UINT drivetype;
|
UINT drivetype;
|
||||||
|
|
||||||
drivespec[0] += drive;
|
drivespec[0] += drive;
|
||||||
|
|
|
@ -82,7 +82,7 @@ BOOL DOSVM_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL f
|
||||||
*/
|
*/
|
||||||
void WINAPI DOSVM_Int25Handler( CONTEXT *context )
|
void WINAPI DOSVM_Int25Handler( CONTEXT *context )
|
||||||
{
|
{
|
||||||
WCHAR drivespec[4] = {'A', ':', '\\', 0};
|
WCHAR drivespec[] = {'A', ':', '\\', 0};
|
||||||
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
|
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
|
||||||
DWORD begin;
|
DWORD begin;
|
||||||
DWORD length;
|
DWORD length;
|
||||||
|
|
|
@ -71,7 +71,7 @@ BOOL DOSVM_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL
|
||||||
*/
|
*/
|
||||||
void WINAPI DOSVM_Int26Handler( CONTEXT *context )
|
void WINAPI DOSVM_Int26Handler( CONTEXT *context )
|
||||||
{
|
{
|
||||||
WCHAR drivespec[4] = {'A', ':', '\\', 0};
|
WCHAR drivespec[] = {'A', ':', '\\', 0};
|
||||||
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
|
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
|
||||||
DWORD begin;
|
DWORD begin;
|
||||||
DWORD length;
|
DWORD length;
|
||||||
|
|
Loading…
Reference in a new issue