[odamex-bug-reporter] [Bug 673] New: evil code in P_CheckOnMobj

  • From: odamex-bugtracker@xxxxxxxxxx
  • To: odamex-bug-reporter@xxxxxxxxxxxxx
  • Date: Wed, 1 Dec 2010 21:06:14 +0000 (UTC)

http://odamex.net/bugs/show_bug.cgi?id=673

           Summary: evil code in P_CheckOnMobj
           Product: Odamex
           Version: 0.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Server & Client
        AssignedTo: odamex-bug-reporter@xxxxxxxxxxxxx
        ReportedBy: russell@xxxxxxxxxxxx


I talked to Hyper_Eye about this a couple of days ago.

The code that is bad is the one that handles the oldmo byte array, you can see
it copies a c++ class to it using memcpy then does the same thing later down
the function but back to a tmthing pointer.

Strangely I thought this was the cause of the tnt demo1 desync msvc2008 built
binaries but apparently not. Oddly enough this code works and does not cause
any ill effects. But that still doesn't mean it should be kept because it is
extremely bad practice, its error prone (though we dont know its effect yet)
and use of copy constructors and operator ='s is better anyway.

Also, this code is called 100% of the time due to the MF2_PASSMOBJ flag on most
objects including the player

-- 
Configure bugmail: http://odamex.net/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Other related posts:

  • » [odamex-bug-reporter] [Bug 673] New: evil code in P_CheckOnMobj - odamex-bugtracker