Commit 2d209702 authored by Kenton Varda's avatar Kenton Varda

Minor bug fixes.

parent 46293bbd
......@@ -21,8 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// This program is a code generator plugin for capnpc which writes the schema back to stdout in
// roughly capnpc format.
// This program is a code generator plugin for `capnp compile` which generates C++ code.
#include <capnp/schema.capnp.h>
#include "../serialize.h"
......
......@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// This program is a code generator plugin for capnpc which writes the schema back to stdout in
// roughly capnpc format.
// This program is a code generator plugin for `capnp compile` which writes the schema back to
// stdout in roughly capnpc format.
#include <capnp/schema.capnp.h>
#include "../serialize.h"
......
......@@ -171,7 +171,9 @@ static char* canonicalizePath(char* path) {
kj::String canonicalizePath(kj::StringPtr path) {
KJ_STACK_ARRAY(char, result, path.size() + 1, 128, 512);
strcpy(result.begin(), path.begin());
char* end = canonicalizePath(result.begin());
char* start = path.startsWith("/") ? result.begin() + 1 : result.begin();
char* end = canonicalizePath(start);
return kj::heapString(result.slice(0, end - result.begin()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment