[Bug 3291] crash in Battlefield 1942 demo:msvcrt-bug?

Wine Bugs wine-bugs at winehq.org
Tue Oct 18 08:31:37 CDT 2005


http://bugs.winehq.org/show_bug.cgi?id=3291





------- Additional Comments From xerox_xerox2000 at yahoo.co.uk  2005-18-10 08:31 -------
OK, that previous fix is definitly not correct. I didn't have a real look at the
code. I've put some extra trace's in the code and this is what i found (code
from cpp.c):

/******************************************************************
 *		?name at type_info@@QBEPBDXZ (MSVCRT.@)
 */
DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_name);
const char * __stdcall MSVCRT_type_info_name(type_info * _this)
{
  if (!_this->name)
  {
    /* Create and set the demangled name */
    /* Nota: mangled name in type_info struct always start with a '.', while
     * it isn't valid for mangled name.
     * Is this '.' really part of the mangled name, or has it some other meaning ?
     *
    char* name = __unDName(0, _this->mangled + 1, 0,
                           MSVCRT_malloc, MSVCRT_free, 0x2800);
--->It turns out that this->mangled = .ABVVec4 at ref2@dice@@
and name is nil...... Is that supposed to be correct?
   

 if (name)
    {

---> So the rest of the code is skipped....
    }

  TRACE("(%p) returning %s\n", _this, _this->name);
  return _this->name;
---> so it just returns nil
}

Somehow Battlefield chokes because of this null return value. Even if i change
the line
return this->name; 
into 
return "rubbish"; 
the game starts up just fine.....

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list