asdlei00 / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

crAddRegKeyA() arguments used wrong way round #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

crAddRegKeyA() calls crAddRegKeyW() with the first two parameters swapped!

Jim

Original issue reported on code.google.com by jimthe...@googlemail.com on 1 Jun 2011 at 8:36

GoogleCodeExporter commented 9 years ago
What CrashRpt version do you use? Can you point a source file/line where the 
parameters are swapped?

Original comment by zexspect...@gmail.com on 3 Jun 2011 at 1:53

GoogleCodeExporter commented 9 years ago
Version 1206

The function crAddRegKeyA() is:

CRASHRPTAPI(int)
crAddRegKeyA(   
   LPCSTR pszRegKeyList,
   LPCSTR pszDstFileName,
   DWORD dwFlags
   )
{
  // This is just a wrapper for wide-char function version
  strconv_t strconv;
  return crAddRegKeyW(strconv.a2w(pszDstFileName), strconv.a2w(pszRegKeyList), dwFlags);
}

But is should be:

CRASHRPTAPI(int)
crAddRegKeyA(   
   LPCSTR pszRegKeyList,
   LPCSTR pszDstFileName,
   DWORD dwFlags
   )
{
  // This is just a wrapper for wide-char function version
  strconv_t strconv;
  return crAddRegKeyW(strconv.a2w(pszRegKeyList), strconv.a2w(pszDstFileName), dwFlags);
}

Original comment by jimthe...@googlemail.com on 3 Jun 2011 at 2:00

GoogleCodeExporter commented 9 years ago
Please upgrade to v1.2.10. This problem seems to be fixed there. 

Original comment by zexspect...@gmail.com on 7 Jun 2011 at 1:48

GoogleCodeExporter commented 9 years ago
Closing this. 

Original comment by zexspect...@gmail.com on 18 Aug 2011 at 2:11