aboutsummaryrefslogtreecommitdiff
path: root/lib/file_hash
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-14 16:30:43 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-14 16:30:43 -0700
commitddb839bfd4ba8dbdd214f3e885629fc8fe57e68c (patch)
treeaee183d005229b21a5ce636685f416f97bd5aa9e /lib/file_hash
parent7f138199078a2fc2b6d6ee8d31da940120c8216a (diff)
Replacing (size of $) with (#$) as should have been done before.
Diffstat (limited to 'lib/file_hash')
-rw-r--r--lib/file_hash/init.nom6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/file_hash/init.nom b/lib/file_hash/init.nom
index 709c622..bbf1060 100644
--- a/lib/file_hash/init.nom
+++ b/lib/file_hash/init.nom
@@ -47,9 +47,9 @@ if $use_sha1:
(hash $) means:
$bytes = ($, bytes)
$hash = ($bytes.1 << 7)
- for $i in 2 to (size of $bytes):
+ for $i in 2 to (#$bytes):
$hash = ((1000003 * $hash) ~ $bytes.$i)
- $hash = ($hash ~ (size of $bytes))
+ $hash = ($hash ~ (#$bytes))
return "\$hash"
external:
@@ -59,4 +59,4 @@ external:
$file_hash = (hash $contents)
if ($file_hash == $hash):
return $filename
- (hash of file $filename) parses as (hash (read file $filename))
+ (hash of file $filename) parses as (hash (read file $filename)) \ No newline at end of file