Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#4572) simple_path_unit_iterator: 'omniscience' field n
Home

[Freeciv-Dev] (PR#4572) simple_path_unit_iterator: 'omniscience' field n

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4572) simple_path_unit_iterator: 'omniscience' field not initialized
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Jul 2003 09:26:29 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On a simple autogame valgrind will eventually give:

==21990== Conditional jump or move depends on uninitialised value(s)
==21990==    at 0x80D15C6: init_node (path_finding.c:194)
==21990==    by 0x80D1BCC: pf_create_map (path_finding.c:392)
==21990==    by 0x80D0417: find_city_to_diplomat (aidiplomat.c:327)
==21990==    by 0x80CFDEB: ai_choose_diplomat_offensive (aidiplomat.c:163)

because parameter->omniscience isn't initialized in pft_fill_unit_parameter.

The attached patch should fix this, I hope.

jason

Attachment: omniscience.diff
Description: omniscience.diff


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#4572) simple_path_unit_iterator: 'omniscience' field not initialized, Jason Short <=