You are correct.  That is the proper fix.  I have committed it.  The
first step is actually the hex that the unit starts on.

john/darthfool

On 4/21/07, Mark de Wever <[EMAIL PROTECTED]> wrote:
> After some recent crashing bug I've started to run some test with
> Wesnoth under Valgrind in hope to uncover more possible problems.
> I found one, but not sure what's the best way to fix it.
>
> These 2 lines lead to invalid memory access
>
> 430 if(steps.empty() == false) {
> 431     unit_map::const_iterator utest=info_.units.find(*(steps.begin()+1));
>
> This happens when steps.size() == 1
> I'm unfamiliar with this part of the code the easy fix is to modify line
> 430 to
> if(steps.size() > 1) {
>
> But if somebody who's more familar with that code wants to take a look
> please do.
>
> Regards,
> Mark de Wever aka Mordante/SkeletonCrew
>
> _______________________________________________
> Wesnoth-dev mailing list
> [email protected]
> https://mail.gna.org/listinfo/wesnoth-dev
>


-- 
-------------------------------------------------------------------
        "In theory, theory and practice are the same,
                 but in practice they're different."
-------------------------------------------------------------------
John W. C. McNabb
-------------------------------------------------------------------

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to