Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2001:
[Freeciv-Dev] BUG/PATCH: map_adjust_x() sometimes returns map.xsize (PR#
Home

[Freeciv-Dev] BUG/PATCH: map_adjust_x() sometimes returns map.xsize (PR#

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] BUG/PATCH: map_adjust_x() sometimes returns map.xsize (PR#749)
From: Lino Mastrodomenico <mastro@xxxxxxxxxx>
Date: Wed, 18 Apr 2001 09:07:33 -0700 (PDT)

The macro map_adjust_x() returns map.xsize when called with x==k*map.xsize 
and k is negative.
Eg: map_adjust_x(-map.xsize) will return map.xsize.

Patch for common/map.h attached (the redundant modulus calculation is 
eliminated when running gcc with the -O2 option).

Note that normalize_map_pos() in common/map.c is already correct.

ciao

-- 
Lino Mastrodomenico
E-mail: mastro@xxxxxxxxxx

Attachment: map.h.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] BUG/PATCH: map_adjust_x() sometimes returns map.xsize (PR#749), Lino Mastrodomenico <=