URL:
  <http://gna.org/bugs/?19349>

                 Summary: Uninitialised variable in Gtk message options
dialog
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sun Jan 29 18:33:42 2012
                Category: client-gtk-2.0
                Severity: 2 - Minor
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: 2.3.1
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.3.2

    _______________________________________________________

Details:

(One of a set of bugs spotted by user "Bit" on the forum
<http://forum.freeciv.org/viewtopic.php?t=7287> when compiling with VC.)

In create_messageopt_dialog(), the variable "i" is used uninitialised in "n =
(i % NUM_LISTS)".

However, since NUM_LISTS is currently always 1, we get away with it -- n is
always 0 regardless of the value of i.

(This appears to be a compile-time option to display the many message options
in several columns, or similar. But it wouldn't have worked since i is never
incremented either, so I fixed that too.)

(I tried setting NUM_LISTS to 2 and was slightly alarmed that my GCC still
didn't warn me about this...)




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19349>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to