about summary refs log tree commit diff stats
path: root/search.lua
diff options
context:
space:
mode:
Diffstat (limited to 'search.lua')
-rw-r--r--search.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/search.lua b/search.lua
index fe57ac9..67b82b3 100644
--- a/search.lua
+++ b/search.lua
@@ -139,7 +139,7 @@ function rfind(s, pat, i, plain)
   local rendpos = rs:find(rpat, ri, plain)
   if rendpos == nil then return nil end
   local endpos = #s - rendpos + 1
-  assert (endpos >= #pat)
+  assert (endpos >= #pat, ('rfind: endpos %d should be >= #pat %d at this point'):format(endpos, #pat))
   return endpos-#pat+1
 end