1
0
Fork 0

fixed wrong assertion

This commit is contained in:
jsteemann 2017-03-14 11:22:37 +01:00
parent a42948c6bc
commit 889960a6a0
1 changed files with 8 additions and 4 deletions

View File

@ -1528,7 +1528,7 @@ AqlValue Functions::Attributes(arangodb::aql::Query* query,
result.openArray();
for (auto const& it : keys) {
TRI_ASSERT(!it.empty());
if (removeInternal && it.at(0) == '_') {
if (removeInternal && !it.empty() && it.at(0) == '_') {
continue;
}
result.add(VPackValue(it));
@ -1588,9 +1588,13 @@ AqlValue Functions::Values(arangodb::aql::Query* query,
// somehow invalid
continue;
}
if (removeInternal && entry.key.copyString().at(0) == '_') {
// skip attribute
continue;
if (removeInternal) {
VPackValueLength l;
char const* p = entry.key.getString(l);
if (l > 0 && *p == '_') {
// skip attribute
continue;
}
}
if (entry.value.isCustom()) {
builder->add(VPackValue(trx->extractIdString(slice)));