Crash LC8.1.6 after delete char

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Crash LC8.1.6 after delete char

Postby sphere » Wed Aug 23, 2017 11:41 am

Hello,

now i don't know if the below delete line is completely good, but it gives no error applying the code.
My intension was to delete the last 4 characters of the local value
But it causes to crash LC8.1.6, i did not test any other version

Code: Select all
local tA
on mouseUp
put"abracadabra" into tA
delete the last char to -4 of tA
answer tA
end mouseUp


Am i doing it wrong or is it a bug?

Regards,
Sphere
Last edited by sphere on Wed Aug 23, 2017 2:10 pm, edited 1 time in total.
sphere
 
Posts: 402
Joined: Sat Sep 27, 2014 10:32 am
Location: Hummelo, the Netherlands

Re: Crash LC8.1.6 after delete char

Postby [-hh] » Wed Aug 23, 2017 12:22 pm

Not a bug with respect to your code, the code is not correct.
But the crash with your code (corrected to "end" in the last line) is also in LC 6.7.11, you should report this.

@your code.

You could use

Code: Select all
delete char -4 to -1 of tA

OR, as I prefer:

Code: Select all
local tA
on mouseUp
   put "abracadabra" into tA
   answer char 1 to -5 of tA
end mouseUp
shiftLock happens
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Livecode Membership
 
Posts: 1485
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Crash LC8.1.6 after delete char

Postby sphere » Wed Aug 23, 2017 2:13 pm

Hi Herman,

thanks, so in fact count from first char to minus 5 from the last char, in speaking words. Or from minus 5 form the last to minus 1 from the last (for example)

Great.
I will report it.


*****edit**** bug reported http://quality.livecode.com/show_bug.cgi?id=20293
sphere
 
Posts: 402
Joined: Sat Sep 27, 2014 10:32 am
Location: Hummelo, the Netherlands


Return to Bug Triage

Who is online

Users browsing this forum: No registered users and 0 guests