Unlike other places where a QueryResult is created, resultFlags() aren't initialized in this function:
QueryResult* emptyMoreResult(long long cursorid)
{ BufBuilder b(32768); b.skip(sizeof(QueryResult)); QueryResult *qr = (QueryResult *) b.buf(); qr->cursorId = 0; // 0 indicates no more data to retrieve. qr->startingFrom = 0; qr->len = b.len(); qr->setOperation(opReply); qr->nReturned = 0; b.decouple(); return qr; }Not sure if this would cause a problem with any drivers, but might make sense to ensure we have a deterministic response in such cases.