patchFreeciv - Patches: patch #3504, On new unit creation client copies...

 
 
Show feedback again

patch #3504: On new unit creation client copies transported_by info to same place it reads it

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Fri 17 Aug 2012 01:06:03 AM UTC  
 
Category: clientPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 12 Dec 2012 10:45:32 AM UTC, SVN revision 22073:

Removed no-op block of code.

See gna patch #3504

(Browse SVN revision 22073)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 08 Dec 2012 10:50:43 PM UTC, comment #1:

Patch to remove the effectively no-op code.

(file #16834)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 17 Aug 2012 01:06:03 AM UTC, original submission:

On creation of new unit (which is reusing existing unit structure by 'punit = packet_unit')

packhand.c:1577:

if (punit->client.transported_by != -1) {
punit->client.transported_by = packet_unit->client.transported_by;
}

So, if the punit (unit to be created) previously has transported_by field other than -1 (=it is transported), it (unit to be created) information is set from packet (which is actually same pointer)

I don't see how this could make any harm, but it should be removed anyway. Or do I miss something? In which case checking old value of punit seems suspicious.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #16834:  ObsTbySet.patch added by cazfi (488B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Dec 2012 10:46:03 AM UTCcazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sat 08 Dec 2012 10:50:43 PM UTCcazfiAttached File-=>Added ObsTbySet.patch, #16834
      CategoryNone=>client
      StatusNone=>Ready For Test
      Planned Release=>2.5.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup