From a1f2941f5eb5e7709766afd6604cb06788e37294 Mon Sep 17 00:00:00 2001 From: uid68803 Date: Tue, 17 Feb 2004 20:14:08 +0000 Subject: [PATCH] fixed illegal memory access --- src/ai.cpp | 2 +- src/ai.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ai.cpp b/src/ai.cpp index 72d896ddbb0..399e4915be0 100644 --- a/src/ai.cpp +++ b/src/ai.cpp @@ -102,7 +102,7 @@ const team& ai_interface::current_team() const } -void ai_interface::move_unit(const location& from, const location& to, std::map& possible_moves) +void ai_interface::move_unit(location from, location to, std::map& possible_moves) { assert(info_.units.find(to) == info_.units.end() || from == to); diff --git a/src/ai.hpp b/src/ai.hpp index ccb4f296657..e851a90d737 100644 --- a/src/ai.hpp +++ b/src/ai.hpp @@ -52,7 +52,7 @@ public: protected: void attack_enemy(const location& u, const location& target, int weapon); - void move_unit(const location& from, const location& to, std::map& possible_moves); + void move_unit(location from, location to, std::map& possible_moves); void calculate_possible_moves(std::map& moves, move_map& srcdst, move_map& dstsrc, bool enemy, bool assume_full_movement=false);