Hi!

______________O\_/_________________________________\_/O______________
    case 0x38:
      {
        UWORD cntry = lr.AL;
-
-       if (cntry == 0)
-         cntry = (UWORD) - 1;
-       else if (cntry == 0xff)
        if (cntry == 0xff)
          cntry = lr.BX;

        if (0xffff == lr.DX)
        {
          /* Set Country Code */
          if ((rc = DosSetCountry(cntry)) < 0)
            goto error_invalid;
        }
        else
        {
+         if (cntry == 0)
+           cntry--; /* -1 */
          /* Get Country Information */
          if ((rc = DosGetCountryInformation(cntry, FP_DS_DX)) < 0)
            goto error_invalid;
          /* HACK FIXME */
          if (cntry == (UWORD) - 1)
            cntry = 1;
          /* END OF HACK */
          lr.AX = lr.BX = cntry;
        }
      }
      break;
_____________________________________________________________________
              O/~\                                 /~\O

- first bug: for SetCountry (DX==-1) AL shouldn't be fixed (AL==0 -> error).
  My patch above fixes this.
- second bug: code inside "HACK FIXME" always returns 1 as country code for
  AL=0 on input. Don't know how to easy fix this.




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to