Commit df08b918 authored by Carsten Schlote's avatar Carsten Schlote
Browse files

Add recommended changes reported by RobT2012

Thanks for the issues report. Changes applied.
parent 54d653d8
......@@ -258,13 +258,13 @@ struct MDB_val {
/** Constructor to setup structure from a string. */
this(const string data) nothrow {
import std.string;
this(toStringz(data), data.sizeof);
this(toStringz(data), data.length+1);
}
/** Constructor to setup structure from a C string. */
this(const char* data) nothrow {
import core.stdc.string;
this(data, strlen(data));
this(data, strlen(data)+1);
}
/** Constructor to setup structure from abitrary data. */
......@@ -315,7 +315,7 @@ struct MDB_val {
/** Assigns new structure values from a const C-string. */
ref MDB_val assign(const char* data) nothrow {
import core.stdc.string;
return assign(data, strlen(data));
return assign(data, strlen(data)+1);
}
/** Assigns new structure values from abitrary data.. */
......
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