Changeset 6 for trunk


Ignore:
Timestamp:
Dec 17, 2005, 7:34:35 AM (14 years ago)
Author:
jtv
Message:

Fixes overrun bug in save/restore code

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gamelogic.cxx

    r5 r6  
    350350      {
    351351    x <<= 1;
    352     if (at(r,c+i).mined()) x |= 1;
     352    if (c+i < m_cols && at(r,c+i).mined()) x |= 1;
    353353      }
    354354      *here++ = produce_char(x);
     
    368368      {
    369369    x <<= 1;
    370     if (at(r,c+i).revealed()) x |= 1;
     370    if (c+i < m_cols && at(r,c+i).revealed()) x |= 1;
    371371      }
    372372      *here++ = produce_char(x);
  • trunk/ui_cli.cxx

    r5 r6  
    8181int main()
    8282{
    83   int rows=20, cols=30, mines=200;
     83  int rows=20, cols=50, mines=200;
    8484
    8585  try
Note: See TracChangeset for help on using the changeset viewer.