Changeset 83 for trunk/orca

Show
Ignore:
Timestamp:
03/08/06 22:12:29 (3 years ago)
Author:
krobillard
Message:

Poke now handles values <= 0 correctly.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/series.c

    r82 r83  
    11491149 
    11501150    if( a2->type == OT_INTEGER ) 
    1151         n = orInt(a2) - 1; 
     1151        n = orInt(a2); 
    11521152    else if( a2->type == OT_DECIMAL ) 
    1153         n = ((int) orDecimal(a2)) - 1; 
     1153        n = ((int) orDecimal(a2)); 
    11541154    else    // OT_LOGIC 
    1155         n = orInt(a2) ? 0 : 1; 
     1155        n = orLogic(a2) ? 1 : 2; 
     1156 
     1157    if( n > 0 ) 
     1158        --n; 
     1159    else if( n == 0 ) 
     1160        goto bad_index; 
    11561161 
    11571162    n += a1->series.it;