summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--clap.zig4
-rw-r--r--example/README.md.template6
2 files changed, 8 insertions, 2 deletions
diff --git a/clap.zig b/clap.zig
index e8a43d0..95ed665 100644
--- a/clap.zig
+++ b/clap.zig
@@ -913,9 +913,9 @@ fn Arguments(
913 }, 913 },
914 }; 914 };
915 915
916 const name = longest.name[0..longest.name.len].*; 916 const name = longest.name[0..longest.name.len] ++ ""; // Adds null terminator
917 fields[i] = .{ 917 fields[i] = .{
918 .name = &name, 918 .name = name,
919 .type = @TypeOf(default_value), 919 .type = @TypeOf(default_value),
920 .default_value = @ptrCast(&default_value), 920 .default_value = @ptrCast(&default_value),
921 .is_comptime = false, 921 .is_comptime = false,
diff --git a/example/README.md.template b/example/README.md.template
index 34bff56..b296ca3 100644
--- a/example/README.md.template
+++ b/example/README.md.template
@@ -23,6 +23,12 @@ in the release notes.
23* Print help message from parameter specification. 23* Print help message from parameter specification.
24* Parse help message to parameter specification. 24* Parse help message to parameter specification.
25 25
26## API Reference
27
28Automatically generated API Reference for the project
29can be found at https://Hejsil.github.io/zig-clap.
30Note that Zig autodoc is in beta; the website may be broken or incomplete.
31
26## Examples 32## Examples
27 33
28### `clap.parse` 34### `clap.parse`