[PATCH] Fix to acmFormatEnumW

James Hatheway james at macadamian.com
Fri Feb 9 08:12:34 CST 2001


Hi,

There is a bug in acmFormatEnumW that is causing my
application to crash.  If acmFormatEnumW is entered
without a handle to a driver, it properly loops
through all drivers, calling the designated application
callback until the callback returns FALSE or there
are no more drivers, then returns MMSYSERR_NOERROR.
However, if there is a passed in handle to a driver,
it instead make the call to the callback with
formats only from this driver, and returns the
value passed back from the application callback.  If
this is TRUE, (1) that is equal to MMSYSERR_ERROR and
causing my application to crash.  acmFormatEnumW should pass
back MMSYSERR_NOERROR no matter what the callback
returns, just like the bottom portion of the code.
This patch fixes that.


Changelog:
  James Hatheway - james at macadamian.com
  acmDriverEnumW shouldn't return MMSYSERR_ERROR
  if acmDriverEnumCallback returns TRUE.

Modified:
  dlls/msacm/format.c


--
James Hatheway
Software Designer - Macadamian Technologies, Inc.
james at macadamian.com ~ http://www.macadamian.com

  "Man könnte froh sein, wenn die Luft so rein wäre wie das Bier"
  "One could be happy if the air were as pure as the beer"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enumFormatW_fix.diff
Type: application/octet-stream
Size: 2006 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20010209/3803a5b9/enumFormatW_fix.obj


More information about the wine-patches mailing list