aboutsummaryrefslogtreecommitdiff
path: root/examples/sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sample.c')
-rw-r--r--examples/sample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sample.c b/examples/sample.c
index 577851f7..20abe318 100644
--- a/examples/sample.c
+++ b/examples/sample.c
@@ -53,7 +53,7 @@ static int auth_callback(const char *prompt, char *buf, size_t len,
if (echo) {
while ((answer = fgets(buf, len, stdin)) == NULL);
if ((ptr = strchr(buf, '\n'))) {
- ptr = '\0';
+ *ptr = '\0';
}
} else {
answer = getpass(prompt);