diff --git a/htmltotext.d b/htmltotext.d
index 296f886..9e03ec2 100644
--- a/htmltotext.d
+++ b/htmltotext.d
@@ -4,7 +4,7 @@ import arsd.dom;
import std.string;
import std.array : replace;
-string repeat(string s, int num) {
+string repeat(string s, ulong num) {
string ret;
foreach(i; 0 .. num)
ret ~= s;