<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39821 >

Hi!

Don't worry, thanks for the patch(es)!  =)

--- [EMAIL PROTECTED] wrote:

From: "Ulrik Sverdrup" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Fwd: [Freeciv-Dev] (PR#39821) Global Lists Bug... Can't Add to top of 
list?
Date: Fri, 11 Apr 2008 18:58:28 -0700


<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39821 >

Sorry for the spam, Core. I was trying to send this to the list. I
really have to learn some things about operating email...

Here is an email I *should* have sent to the bugtracker yesterday.

Ulrik

---------- Forwarded message ----------
From: Ulrik Sverdrup <[EMAIL PROTECTED]>
Date: 10.04.2008 21:55
Subject: Re: [Freeciv-Dev] (PR#39821) Global Lists Bug... Can't Add to
top of list?
To: [EMAIL PROTECTED]


2008/4/10, Ulrik Sverdrup <[EMAIL PROTECTED]>:

>
 >  <URL: http://bugs.freeciv.org/Ticket/Display.html?id=39821 >
 >
 >
 >  The worklist editor assumes that if ptr->pcity is NULL, you can't edit
 >  the worklist. This reverses that to allow the global worklist editor
 >  to enable all buttons.
 >
 >  The original reporter only mentions the prepend button but the append
 >  button should also have been affected.
 >
 >  Attached simple patches to trunk and 21 branches that fix this by
 >  modifying the sensitivity check.
 >
 >  Old check:
 >  client can issue commands AND pcity not NULL AND player owns pcity
 >  New check
 >  client can issue commands AND ( (pcity not NULL AND player owns pcity)
 >  OR pcity is NULL)
 >
 >  The "extra" null check is so that we don't get a crash on looking up
 >  an owner for city NULL, of course.
 >
 >  Can someone test this? I can't find any other case than the global
 >  worklist editor where pcity is NULL.
 >
 >  Ulrik
 >


Always embarrassing to send something twice. Staring at the logic
 above long enough, you'll see that it's simpler to write the
 conditional as in this patch, taking advantage of course of C's
 cross-circuiting rules.


 Ulrik





_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to