forked from mirrors/nixpkgs
16 lines
480 B
Diff
16 lines
480 B
Diff
|
diff --git a/src/contrib/zkfuse/src/zkadapter.cc b/src/contrib/zkfuse/src/zkadapter.cc
|
||
|
index 886051d..93dbef5 100644
|
||
|
--- a/src/zkadapter.cc
|
||
|
+++ b/src/zkadapter.cc
|
||
|
@@ -845,7 +845,10 @@ ZooKeeperAdapter::getNodeData(const string &path,
|
||
|
string("Unable to get data of node ") + path, rc
|
||
|
);
|
||
|
} else {
|
||
|
- return string( buffer, buffer + len );
|
||
|
+ if (len == -1) {
|
||
|
+ len = 0;
|
||
|
+ };
|
||
|
+ return string( buffer, len );
|
||
|
}
|
||
|
}
|