summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/array.c b/array.c
index f97ac5c..a46668b 100644
--- a/array.c
+++ b/array.c
@@ -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]);