Changeset 335


Ignore:
Timestamp:
Feb 2, 2011, 6:43:36 PM (10 years ago)
Author:
sam
Message:

Fix a crash caused by potential code/data discrepancies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tileset.cpp

    r328 r335  
    8383    data->h = h;
    8484    data->dilate = dilate;
    85     /* FIXME: check for non-zero here */
    86     data->nw = data->img->w / w;
    87     data->nh = data->img->h / h;
     85    data->nw = data->img->w > w ? data->img->w / w : 1;
     86    data->nh = data->img->h > h ? data->img->h / h : 1;
    8887    data->ntiles = data->nw * data->nh;
    8988    data->tx = (float)w / PotUp(data->img->w);
Note: See TracChangeset for help on using the changeset viewer.