[Freeciv-Dev] (PR#40415) [Patch] Fix incorrect use of strlen in strncmp

2008-08-06 Thread Madeline Book
http://bugs.freeciv.org/Ticket/Display.html?id=40415 > Commited to S2_2 (r15097) and trunk (r15098). --- もう疲れた。寝る。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.or

[Freeciv-Dev] (PR#40415) [Patch] Fix incorrect use of strlen in strncmp

2008-08-03 Thread Madeline Book
http://bugs.freeciv.org/Ticket/Display.html?id=40415 > > [EMAIL PROTECTED] - Sun Aug 03 21:13:54 2008]: > > Good catch. But why need strncmp at all? The string is always > null-terminated, is it not? Then strcmp will work just fine. True, it is very unlikely that both pcity->name and packet-

Re: [Freeciv-Dev] (PR#40415) [Patch] Fix incorrect use of strlen in strncmp

2008-08-03 Thread Jason Dorje Short
http://bugs.freeciv.org/Ticket/Display.html?id=40415 > Good catch. But why need strncmp at all? The string is always null-terminated, is it not? Then strcmp will work just fine. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail

[Freeciv-Dev] (PR#40415) [Patch] Fix incorrect use of strlen in strncmp

2008-08-01 Thread Madeline Book
http://bugs.freeciv.org/Ticket/Display.html?id=40415 > Attached patch fixes this programming error: strncmp(packet->name, pcity->name, strlen(pcity->name)) which was causing a minor display bug for observers: if a city changed its name by only adding characters to its existing name, then the ne