Branch: Tag:

2000-03-10

2000-03-10 00:58:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed bug again.

Rev: src/pike_types.c:1.126

5:   \*/   /**/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.125 2000/03/10 00:53:49 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.126 2000/03/10 00:58:59 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
2750:    if(low_pike_types_le(tString, index_type, 0, 0) &&    (a = low_index_type(t, tString, n))) {    /* Possible to index the array with a string. */ -  if (low_match_types(tInt, index_type, 0)) { -  /* Also possible to index the array with an int. */ +     type_stack_mark();    push_finished_type(a);    free_string(a);    push_type(T_ARRAY); -  +  +  if (low_match_types(tInt, index_type, 0)) { +  /* Also possible to index the array with an int. */    push_unfinished_type(t);    push_type(T_OR); -  +  }    return pop_unfinished_type();    } -  return a; -  } +     if (low_match_types(tInt, index_type, 0)) {    /* Possible to index the array with an int. */    return make_shared_binary_string(t, type_length(t));