Ignore:
Timestamp:
2013-07-22 22:04:57 (10 years ago)
Author:
mikrkana
Message:

Korjattu kenttätietorakenteesta aiheutunut IndexOutOfRangeException?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/MiskaK/MW2(My Warfare 2)/MW2(My Warfare 2)/MW2(My Warfare 2)/Kentta.cs

    r4532 r4534  
    6060    private bool TarkistaOlemassaolo(int x, int y, bool saakoOllaVarattu = false) 
    6161    { 
    62         if (x < 0 || x > KentanOsat.GetLength(0)) return false; 
    63         if (y < 0 || y > KentanOsat.GetLength(1)) return false; 
     62        if (x < 0 || x >= KentanOsat.GetLength(0)) return false; 
     63        if (y < 0 || y >= KentanOsat.GetLength(1)) return false; 
    6464        if (!saakoOllaVarattu) // voidaan ohittaa vaatimus tyhjästä ruudusta 
    6565            if (KentanOsat[x, y] == null) return false; 
Note: See TracChangeset for help on using the changeset viewer.