diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index 140e88028..2b3d6fa5f 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -2505,7 +2505,8 @@ void ArrayCtrl::MouseWheel(Point p, int zdelta, dword keyflags) { Vector ArrayCtrl::ReadRow(int i) const { Vector v; - for(int j = 0; j < idx.GetCount(); j++) + int n = max(idx.GetCount(), i < array.GetCount() ? array[i].line.GetCount() : 0); + for(int j = 0; j < n; j++) v.Add(Get(i, j)); return v; }