Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added a gag to prevent crashes on parsing errors

  • Loading branch information...
commit 0e0b19c905d58f6795a57f8042a958a76dec7f60 1 parent 7e9c731
Alexander Yakushev authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 utf8.lua
4 utf8.lua
@@ -100,6 +100,10 @@ end
100 100 -- instead of bytes
101 101 function utf8sub (s, i, j)
102 102 j = j or -1
  103 +
  104 + if i == nil then
  105 + return ""
  106 + end
103 107
104 108 local pos = 1
105 109 local bytes = string.len(s)

0 comments on commit 0e0b19c

Please sign in to comment.
Something went wrong with that request. Please try again.