diff options
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -191,7 +191,7 @@ arrayitem(Array *a, int index) case AtypeFloat: res = mkscalarfloat(a->mixeddata[index].f); break; case AtypeRune: res = mkscalarrune(a->mixeddata[index].r); break; default: - throwerror(L"Unhandled case in arrayitem", ENotImplemented); + throwerror(L"Unhandled case in arrayitem 1", ENotImplemented); } break; case AtypeArray: @@ -199,7 +199,7 @@ arrayitem(Array *a, int index) incarrayref(res); break; default: - throwerror(L"Unhandled case in arrayitem", ENotImplemented); + throwerror(L"Unhandled case in arrayitem 2", ENotImplemented); } return res; } @@ -351,6 +351,8 @@ fillelement(Array *a) return fill; } case AtypeArray:{ + if(GetSize(a) == 0) + return fnSame(a->prototype); Array *b = duparrayshape(a, GetType(a)); for(int i = 0; i < GetSize(b); i++){ Array *fill = fillelement(a->arraydata[i]); |