1
1
mirror of https://github.com/walles/moar.git synced 2024-11-12 17:22:53 +03:00

Fix an off-by-one error

This commit is contained in:
Johan Walles 2019-06-16 09:23:25 +02:00
parent d7dacd4dae
commit abe8f37eaf

View File

@ -49,7 +49,7 @@ func _StyledStringsFromString(s string) []_StyledString {
for _, match := range matches {
end = match[0]
if end > beg+1 {
if end > beg {
// Otherwise the string is empty, no point for us in that
styledStrings = append(styledStrings, _StyledString{
String: s[beg:end],