Resend: winedos: fix EXTENDED COUTRY INFORMATION
Markus Amsler
markus.amsler at oribi.org
Wed Sep 8 05:57:25 CDT 2004
This time with diff -u.
Changelog:
* respect given buffer size in GET EXTENDED COUNTRY INFORMATION
-------------- next part --------------
Index: int21.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int21.c,v
retrieving revision 1.68
diff -u -r1.68 int21.c
--- int21.c 18 Aug 2004 00:04:58 -0000 1.68
+++ int21.c 8 Sep 2004 10:56:19 -0000
@@ -1873,7 +1873,8 @@
static void INT21_ExtendedCountryInformation( CONTEXT86 *context )
{
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegEs, context->Edi );
-
+ BYTE buffsize = CX_reg (context);
+
TRACE( "GET EXTENDED COUNTRY INFORMATION, subfunction %02x\n",
AL_reg(context) );
@@ -1904,8 +1905,13 @@
*(WORD*)(dataptr+1) = 38; /* Size of the following info */
*(WORD*)(dataptr+3) = INT21_GetSystemCountryCode(); /* Country ID */
*(WORD*)(dataptr+5) = GetOEMCP(); /* Code page */
- INT21_FillCountryInformation( dataptr + 7 );
- SET_CX( context, 41 ); /* Size of returned info */
+ /* FIXME: fill buffer partially up to buffsize bytes*/
+ if (buffsize >= 0x29){
+ INT21_FillCountryInformation( dataptr + 7 );
+ SET_CX( context, 0x29 ); /* Size of returned info */
+ }else{
+ SET_CX( context, 0x07 ); /* Size of returned info */
+ }
break;
case 0x02: /* GET POINTER TO UPPERCASE TABLE */
More information about the wine-patches
mailing list