Skip to content
Snippets Groups Projects
Commit 8fbe6939 authored by Mick Jordan's avatar Mick Jordan
Browse files

Merge pull request #160 in G/fastr from ~MICK.JORDAN_ORACLE.COM/fastr:bugfix/dimnames to master

* commit '3a3a55e4':
  fix dimnames bug; move code from RVector to vector extract code
parents 7ef03482 3a3a55e4
Branches
No related tags found
No related merge requests found
......@@ -295,6 +295,8 @@ final class CachedExtractVectorNode extends CachedVectorNode {
Object result;
if (dataAt == RNull.instance) {
result = RNull.instance;
} else if (positions[i] instanceof RAbstractContainer && ((RAbstractContainer) positions[i]).getLength() == 0) {
result = RNull.instance;
} else {
result = extract(i, (RAbstractStringVector) dataAt, positions[i], positionProfile[i]);
}
......
......@@ -398,7 +398,7 @@ public abstract class RVector extends RSharingAttributeStorage implements RShare
}
} else {
RStringVector dimVector = (RStringVector) dimObject;
if (dimVector == null || dimVector.getLength() == 0) {
if (dimVector == null) {
newDimNames.updateDataAt(i, RNull.instance, null);
} else if (dimVector.getLength() != dimensions[i]) {
throw RError.error(invokingNode, RError.Message.DIMNAMES_DONT_MATCH_EXTENT, i + 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment