summaryrefslogtreecommitdiff
path: root/hasher.c
diff options
context:
space:
mode:
Diffstat (limited to 'hasher.c')
-rw-r--r--hasher.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hasher.c b/hasher.c
index 96702da..435dbfa 100644
--- a/hasher.c
+++ b/hasher.c
@@ -15,6 +15,8 @@ int main() {
break;
if (strlen(line) == 0)
continue;
+ if (line[strlen(line)-1] == '\n')
+ line[strlen(line)-1] = '\0';
ret = btrfs_name_hash(line, strlen(line), &result);
BUG_ON(ret);
printf("hash returns %Lu\n", result);