Bug in eachword

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug in eachword

Jolle Carlestam-2
There’s a flaw in string->eachword.
It will choke if the passed string ends with certain chars.

This works:

local(mytext = 'The quick brown fox jumped over the fence')
with word in #mytext->eachword select #word

This fails:

local(mytext = 'The quick brown fox jumped over the fence!')
with word in #mytext->eachword select #word


Error message: The position 43 was out of range. The valid range was 1-42

Other chars that I’ve found fails are ? - §

Chars that doesn’t fail are, among others; . , : ; ”

I’ve not tested all possible chars. But did note that there’s no problem with Swedish chars, like å ä ö.


Couldn’t find the definition for eachword in the Lasso repository thus can’t offer any bug fix for it.

I’m sure Lassosoft will have a patch in place in no time. :-)

HDB
Jolle

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>