Changeset 118

Show
Ignore:
Timestamp:
05/06/07 19:32:40 (2 years ago)
Author:
pmac
Message:

Fix array-bounds error in dungeon.c, also fix initializer block.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/dungeon.c

    r117 r118  
    13271327 
    13281328/* List indexed by char */ 
    1329 do_cmd_type *converted_list[UCHAR_MAX]; 
     1329do_cmd_type *converted_list[UCHAR_MAX+1]; 
    13301330 
    13311331 
     
    13521352        if (first) 
    13531353        { 
     1354                first = 0; 
    13541355                size_t i; 
    13551356 
     
    13581359                { 
    13591360                        unsigned char key = commands[i].key; 
     1361                        assert(key < N_ELEMENTS(converted_list)); 
    13601362                        converted_list[key] = commands[i].hook; 
    13611363                }