The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Bug in create_object

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » 1.69s Beta5
View previous topic :: View next topic  
Author Message
Blackout



Joined: 16 Aug 2003
Posts: 26

PostPosted: Mon Oct 11, 2010 12:06 am    Post subject: Bug in create_object Reply with quote

I haven't checked the other versions of dawn as my mud is derived from sBeta5 but--

In db.cpp, in function create_object, the following line:
Code:

   obj->material      = pObjIndex->material;


Redirects the pointer obj->material which was assigned memory in new_obj(), where it should be releasing that memory, duplicating the pObjIndex's material and pointing the pointer to that memory. It should then be:

Code:

   replace_string(obj->material, pObjIndex->material);


Since replace_string handles all of that at once. This should save a fair amount of memory as create_object is being called constantly and therefore wasting plenty of memory over the long haul.



_________________
"I could really get around to hating you if I didn't procrastinate so much."

The Third Turning Mud -- Wheel of Time Reimagined
tangent.dune.net 5600
Shaitan, Owner/Head Implementor
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » 1.69s Beta5 All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin